AntennaSiteSkip

いいぜアンテナサイトに飛ぶってならまずはそのふざけた幻想をぶち殺す

目前为 2014-08-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name AntennaSiteSkip
  3. // @namespace https://twitter.com/akameco
  4. // @description いいぜアンテナサイトに飛ぶってならまずはそのふざけた幻想をぶち殺す
  5. // @include http://2ch-c.net/*
  6. // @include http://newser.cc/*
  7. // @include http://get2ch.net/*
  8. // @include http://the-3rd.net/*
  9. // @include http://matomeantena.com/*
  10. // @include http://moudamepo.com/*
  11. // @include http://newmofu.doorblog.jp/*
  12. // @include http://blog-news.doorblog.jp/*
  13. // @include http://nullpoantenna.com/*
  14. // @include http://newpuru.doorblog.jp/*
  15. // @include http://besttrendnews.net/*
  16. // @include http://suomi-neito.com/*
  17. // @include http://2ch.logpo.jp/*
  18. // @include http://anaguro.yanen.org/*
  19. // @include http://a.anipo.jp/*
  20. // @include http://katuru.com/*
  21. // @include http://news-choice.net/*
  22. // @include http://img.favsite.jp/*
  23. // @version 1
  24. // @grant none
  25. // ==/UserScript==
  26.  
  27. // 対応サイト
  28. // しぃアンテナ(*゚ー゚)
  29. // News人
  30. // 2GET
  31. // The 3rd
  32. // ワロタあんてな
  33. // だめぽアンテナ
  34. // にゅーもふ
  35. // ぶろにゅー
  36. // ヌルポあんてな
  37. // にゅーぷる
  38. // Best Trend News
  39. // スオミネイト
  40. // Logpo!2ch
  41. // アナグロあんてな
  42. // アンテナ速報
  43. // 勝つるあんてな!
  44. // newschoice
  45. // 2次元と3次元の画像ブログまとめ
  46.  
  47. (function (){
  48.  
  49. function doOpen() {
  50. let host = location.host;
  51. matchHost[host]();
  52. }
  53.  
  54. window.onload = function () {
  55. setTimeout(function() {
  56. doOpen();
  57. }, 100);
  58. setTimeout(function() {
  59. doOpen();
  60. }, 500);
  61. setTimeout(function() {
  62. doOpen();
  63. }, 1000);
  64. }
  65.  
  66. // targetを取得
  67. function getTarget(path) {
  68. return document.querySelectorAll(path)[0];
  69. }
  70.  
  71. // targetsを取得
  72. function getTargets(path) {
  73. return document.querySelectorAll(path);
  74. }
  75.  
  76. // window.openは_self固定
  77. function wopen(target) {
  78. window.open(target,'_self').focus();
  79. }
  80.  
  81. // リンクがclassで指定されているサイト
  82. function skipClass(select) {
  83. let target = getTarget(select).getAttribute('href');
  84. wopen(target);
  85. }
  86.  
  87. var matchHost = {
  88. // しぃアンテナ(*゚ー゚)
  89. // http://2ch-c.net/*
  90. //"2ch-c.net": function () {
  91. //let target = document.getElementById('pickup').getAttribute('href');
  92. //wopen(target);
  93. //},
  94.  
  95. // しぃアンテナ(*゚ー゚)
  96. // http://2ch-c.net/*
  97. "2ch-c.net": function () {
  98. let targets = document.getElementsByTagName("a");
  99. for (let i=0; i < targets.length; i++) {
  100. if(targets[i].textContent == document.title){
  101. let target = targets[i].getAttribute('href');
  102. wopen(target);
  103. }
  104. }
  105. },
  106.  
  107. // 2GET
  108. //http://get2ch.net/*
  109. "get2ch.net": function() {
  110. skipClass('.pickup a');
  111. },
  112.  
  113. // News人
  114. // http://newser.cc/*
  115. "newser.cc": function() {
  116. let targets = getTargets('td.news-link a');
  117. for (let i=0; i < targets.length; i++) {
  118. if(targets[i].getAttribute('style') != null){
  119. wopen(targets[i]);
  120. }
  121. }
  122. },
  123.  
  124. // The 3rd
  125. // http://the-3rd.net/*
  126. "the-3rd.net": function() {
  127. let targets = getTargets('div#content.wrap div#l_col a');
  128. for (let i=0; i < targets.length; i++) {
  129. if(targets[i].childNodes[1].childNodes[3].getAttribute('style') != null) {
  130. wopen(targets[i]);
  131. }
  132. }
  133. },
  134.  
  135. // ワロタあんてな
  136. // http://matomeantena.com/*
  137. "matomeantena.com": function () {
  138. skipClass('.rss_link > a');
  139. },
  140.  
  141. // にゅーもふ
  142. // http://newmofu.doorblog.jp/*
  143. "newmofu.doorblog.jp": function () {
  144. skipClass('.title_link a');
  145. },
  146.  
  147. // だめぽアンテナ
  148. // http://moudamepo.com/*
  149. "moudamepo.com": function () {
  150. skipClass('.headline_pkup a');
  151. },
  152.  
  153. // ぶろにゅー
  154. // http://blog-news.doorblog.jp/
  155. "blog-news.doorblog.jp": function () {
  156. skipClass('.title_link');
  157. },
  158.  
  159. // ぬるぽあんてな
  160. // http://nullpoantenna.com/*
  161. "nullpoantenna.com": function () {
  162. let target = getTarget('.rss_link').firstChild.getAttribute('href');
  163. wopen(target);
  164. },
  165.  
  166. // にゅーぷる
  167. // http://newpuru.doorblog.jp/*
  168. "newpuru.doorblog.jp": function () {
  169. skipClass('.titleLink');
  170. },
  171.  
  172. // best trend news
  173. // http://besttrendnews.net/*
  174. "besttrendnews.net": function () {
  175. let target = getTarget('.select').firstChild.getAttribute('href');
  176. wopen(target);
  177. },
  178.  
  179. // スオミネイト
  180. // http://suomi-neito.com/*
  181. "suomi-neito.com": function () {
  182. let target = getTarget('.pickup').firstChild.innerHTML;
  183. wopen(target);
  184. },
  185.  
  186. // LogPo!2ch
  187. // http://2ch.logpo.jp/*
  188. "2ch.logpo.jp": function () {
  189. skipClass('.caption a');
  190. },
  191.  
  192. // アナグロあんてな
  193. // http://anaguro.yanen.org/*
  194. "anaguro.yanen.org": function () {
  195. skipClass('.title a');
  196. },
  197.  
  198. // アンテナ速報
  199. // http://a.anipo.jp/*
  200. "a.anipo.jp": function () {
  201. let targets = getTargets('#tbody tr');
  202. for (let i=0; i < targets.length; i++) {
  203. if(targets[i].getAttribute('style') != null){
  204. let target = targets[i].querySelectorAll('a')[0].getAttribute('href');
  205. wopen(target);
  206. }
  207. }
  208. },
  209.  
  210. // 勝つるあんてな
  211. // http://katuru.com/*
  212. "katuru.com": function () {
  213. skipClass('.rss_center_div a');
  214. },
  215.  
  216. //newschoice
  217. //http://news-choice.net/*
  218. "news-choice.net": function () {
  219. skipClass('.pickuptitle a');
  220. },
  221.  
  222. // 2次元と3次元の画像ブログまとめ
  223. // http://img.favsite.jp/*
  224. "img.favsite.jp": function () {
  225. skipClass('.stp');
  226. }
  227.  
  228. };
  229. })();