himado To Flash Script

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

目前为 2017-06-25 提交的版本。查看 最新版本

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