您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
To archiveofsins.com
当前为
// ==UserScript== // @name To Archive Of Sins // @namespace http://github.com/hangjeff // @version 2025-03-19_14h23m // @description To archiveofsins.com // @author hangjeff // @match https://boards.4chan.org/h/* // @match https://boards.4chan.org/hc/* // @match https://boards.4chan.org/hm/* // @match https://boards.4chan.org/i/* // @match https://boards.4chan.org/lgbt/* // @match https://boards.4chan.org/r/* // @match https://boards.4chan.org/s/* // @match https://boards.4chan.org/soc/* // @match https://boards.4chan.org/t/* // @match https://boards.4chan.org/u/* // @exclude https://boards.4chan.org/search* // @require https://code.jquery.com/jquery-3.7.1.slim.min.js // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... $('.thread').each(function(){ let Komica_Thread_Url = window.location.href; if(!Komica_Thread_Url.includes('thread')){ Komica_Thread_Url = Komica_Thread_Url.substring(0, Komica_Thread_Url.lastIndexOf('/') + 1); if(!($(this).find('.postContainer').find('.replylink').first().attr('href') === undefined) ){ Komica_Thread_Url = Komica_Thread_Url + $(this).find('.postContainer').find('.replylink').first().attr('href'); //alert(Komica_Thread_Url); } else{ // Komica_Thread_Url = Komica_Thread_Url + $(this).find('.threadpost').find('.category a:last').attr('href'); console.log('404 Thread Not Found!'); } } // alert( Komica_Thread_Url); $(this).find('.postInfo').first().after(ArchiveIs_Create(Komica_Thread_Url, 'Archive Of Sins')); }) function ArchiveIs_Create(myUrl, myTarget){ let btn = $('<button>', { text: 'Redirect to ' + myTarget, tabindex: '1', click: function(event){ event.preventDefault(); window.open(myUrl.replace("https://boards.4chan.org/", "https://archiveofsins.com/"), '_blank'); return false; } }).css({'display': 'inline-block', 'background-color': 'green'}); return btn; } })();