Greasy Fork is available in English.
让greasyfork论坛默认显示问题讨论而不是脚本反馈,还原真正的论坛功能。Let the greasyfork Forum display problem discussion instead of script feedback by default. Restore the real forum function.
当前为
// ==UserScript==
// @name 让greasyfork论坛还你一个真正的论坛 Let the greasyfork forum return you a real forum
// @namespace a-new-greasyfork-bbs
// @version 0.1.4
// @description 让greasyfork论坛默认显示问题讨论而不是脚本反馈,还原真正的论坛功能。Let the greasyfork Forum display problem discussion instead of script feedback by default. Restore the real forum function.
// @author Wilson
// @icon http://greasyfork.icu/assets/blacklogo16-f649ec98e464d95b075234438da0fa13233b467b3cd1ad020f0ea07dea91d08c.png
// @match *://greasyfork.org/*
// ==/UserScript==
(function() {
'use strict';
var exlude1 = document.querySelector(".sidebar .list-option-groups > div:nth-child(3) > ul > li:nth-child(1) a");
if(exlude1 && exlude1.getAttribute && !exlude1.getAttribute("data-exclude")) exlude1.setAttribute("data-exclude", 1);
var links = document.getElementsByTagName("a");
for(var i in links){
var link = links[i];
if(typeof link ==="object" && link.href && /(\/discussions)\/?$|\/discussions\?/i.test(link.href) && link.href.toLowerCase().indexOf("/no-scripts")===-1){
if(link.getAttribute("data-exclude")==1) continue;
if(link.href.toLowerCase().indexOf("/discussions?")!==-1){
link.href=link.href.replace("/discussions?", "/discussions/no-scripts?");
}else {
link.href=link.href+"/no-scripts";
}
}
}
})();