您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
combines old swagometer & cat scripts. RIP userscripts.org
当前为
// ==UserScript== // @name inthemix hax for extreme postlords // @namespace https://greasyfork.org/users/4295-rwslol // @description combines old swagometer & cat scripts. RIP userscripts.org // @include http://www.inthemix.com.au/forum/showthread.php?* // @include http://www.inthemix.com.au/forum/showpost.php?* // @require http://j.i.tsatic-cdn.net/378/global/jquery/jquery-1.4.2.js // @version 2.0.0 // @grant none // ==/UserScript== // one uses jquery, the other doesn't. call the cops idgaf // might combine them more elegantly later // swagometer dls = document.getElementsByTagName('dl'); for (i = 0; i < dls.length; i++) { // lol just do everything with innerHTML nobody will care m = dls[i].innerHTML.match(/<\/span>[\r\n ]*([0-9,]+)[\r\n ]*<\/div>/i); likes = parseInt(m[1].replace(',', '')); m = dls[i].innerHTML.match(/info-second-amt">[\r\n ]*([0-9,]+)[\r\n ]*<\/dd>/i); posts = parseInt(m[1].replace(',', '')); swag = parseInt(likes / posts * 100000) / 1000; dls[i].innerHTML += '<dt style="border: 0; border-top: 1px solid #ccc">Swag</dt><dd style="border: 0; border-top: 1px solid #ccc; width: 100px">' + swag + '%</dd>'; } // cats $(function() { var catHtml = function() { $(this).html('<img src="http://thecatapi.com/api/images/get?category=sunglasses#' + Math.random() + '">'); }; $('.post-content a[href="profile.php?do=editlist"]').closest('.post-content').each(catHtml); });