您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
img,dat,mayのスレが消えた時に過去ログを表示しちゃう
当前为
// ==UserScript== // @name futaba log search // @namespace https://github.com/himuro-majika // @description img,dat,mayのスレが消えた時に過去ログを表示しちゃう // @include http://img.2chan.net/b/res/*.htm // @include http://dat.2chan.net/b/res/*.htm // @include http://may.2chan.net/b/res/*.htm // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js // @grant none // @version 0.0.1.20150222031851 // ==/UserScript== this.$ = this.jQuery = jQuery.noConflict(true); (function ($) { var t = document.title; //ページタイトル //ログ保管サービスジャンプ先URL(数字以外) //var logServiceURL = "http://peka.sakura.ne.jp/futaba/logbox/detail.html?no="; //虹裏のログを数日分だけ閲覧できるサイト var logServiceURL_dat = "http://appsweets.net/tatelog/dat/thread/"; //リッチー(dat) var logServiceURL_img1 = "http://imgbako.com/"; //ふたろぐばこ(img) var logServiceURL_img2 = "http://parupunte.net/logbox/detail.html?no="; //虹裏のログを数日分だけ閲覧できるサイト(img) var logServiceURL_may = "http://futalog.com/"; //ふたろぐばこ(may) //パターン:http://dat.2chan.net/b/res/68646178.htm var saba = document.domain.match(/^[^.]+/); //鯖名(dat) var f = location.pathname.match(/\d+\.htm/); //ファイル名(68646178.htm) var fd = f[0].match(/\d+/); //ファイル名の数字(68646178) var r; //ジャンプ先URL(フルパス) //鯖毎の振り分け if ( saba == "dat" ) { r = logServiceURL_dat + fd; } else if ( saba == "img" ) { //r = logServiceURL_img1 + f; r = logServiceURL_img2 + fd; } else if ( saba == "may" ) { r = logServiceURL_may + f; } //スレが消えた時 var waitnum = 3; //sec function redirect() { location.href = r; //ログ保管先にジャンプ } if (t == "404 File Not Found") { $("body > h1").before( waitnum + "秒後に<a href='" + r + "' target='_blank'>外部ログサイト*</a>に移動します"); setTimeout(redirect, waitnum * 1000); } else { $("body > table").before("<a href='" + r + "' target='_blank'>外部ログサイト*</a>"); } /* var p = location.href; var saba = document.domain.match(/^[^.]+/); var f = p.match(/[0-9]+\.htm/); var r = "http://rrr-kb.grrr.jp/" + saba + "_log/res/" + f; var a = document.createElement('a'); a.innerHTML = '<a href="' + r + '">いもげログ庫</a>'; var body = document.getElementsByTagName("p").item(0); body.appendChild(a); var s; var e; s = document.evaluate( '//input[@name="email"]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0; i < s.snapshotLength; i++) { e = s.snapshotItem(i); e.parentNode.appendChild(a); } */ })(jQuery);