himado To Flash Script

ひまわり動画において、不具合の多いHTML5から自動でFLASHプレイヤに移動するスクリプトです。

目前為 2018-08-16 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name himado To Flash Script
  3. // @namespace Scottie400
  4. // @include http://himado.in/*
  5. // @exclude http://himado.in/
  6. // @exclude http://himado.in/?keyword*
  7. // @exclude http://himado.in/?mode*
  8. // @exclude http://himado.in/?sort*
  9. // @version 1.12
  10. // @grant none
  11. // @description ひまわり動画において、不具合の多いHTML5から自動でFLASHプレイヤに移動するスクリプトです。
  12. /* ***************************************************************************************************************
  13. ◆ひまわり動画において、不具合の多いHTML5から自動でFLASHプレイヤに移動するスクリプトです。
  14.  運営さんの不具合対応が終わるまでの繋ぎなので、簡易的なものになります。
  15.  Youtube・Dailymotion・veohはサイトの設定で勝手にリダイレクトされどうしようもないのでご容赦。
  16.  
  17. ◆Greasemonkey(firefox)、Tampermonkey(Chorome,Opera)というアドオンが必要です。
  18.  導入方法はこちらを要参照 ⇒ http://dic.nicovideo.jp/a/greasemonkey
  19.  ユーザースクリプトとは? ⇒ https://greasyfork.org/
  20.  
  21. ※Last Update : 2018-08-17
  22. ※ご使用は自己責任でお願いします。責任を負いかねます。
  23. ※推奨環境:Win7が普通に動く程度を満たすスペック・ちゃんと更新しているブラウザ
  24. *************************************************************************************************************** */
  25. // ==/UserScript==
  26.  
  27.  
  28. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  29. // 編集不要範囲 ここから
  30. var LinkYTFC2DMVE = document.getElementById('top_movie_url_link').innerHTML;
  31. var isExistYT = LinkYTFC2DMVE.indexOf("youtube.com")!== -1;
  32. var isExistFC2 = LinkYTFC2DMVE.indexOf("fc2.com")!== -1;
  33. var isExistDM = LinkYTFC2DMVE.indexOf("dailymotion.com")!== -1;
  34. var isExistVE = LinkYTFC2DMVE.indexOf("www.veoh.com")!== -1;
  35.  
  36. $(function(){
  37. if(document.URL.match('&flashplayer')) {
  38. exit;
  39. } else if(isExistYT === true || isExistDM === true || isExistVE === true) {
  40. exit;
  41. } else if(document.URL.match(/\/\d{6}$/)) {
  42. window.location.replace("http://" + $(location).attr('host') + "?id=" + $(location).attr('pathname').replace(/\//g,'') + '&flashplayer');
  43. exit;
  44. } else if(document.URL.match(/\?id=\d{6}/)) {
  45. window.location.replace(document.URL + '&flashplayer');
  46. exit;
  47. }
  48. })();
  49. // 編集不要範囲 ここまで
  50. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////