您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
try to take over the world!
当前为
// ==UserScript== // @name 反恰客脚本 // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match https://quan.ithome.com/0/* // @grant none // ==/UserScript== (function() { 'use strict'; if ($(".postcontent").html().indexOf("class=\"appmore\"") > 0) { var _id = location.href.substring(location.href.indexOf("/0/") + 3, location.href.indexOf("/0/") + 6) + location.href.substring(location.href.indexOf("/0/") + 7, location.href.indexOf("/0/") + 10); $.ajax({ url: "https://ithome.fxxkcar.com/getithomepost.php?id=" + _id, dataType: 'jsonp', jsonp: "CallBack", success: function (data) { var _content=data.content; _content=replaceimg(_content,data.imgs); $(".postcontent").html(_content); } }) } function replaceimg(content,imgsArr){ var _rexArray=content.match(/(<!--IMG_)(\d|\d\d)-->/g); for(var _i=0;_i<_rexArray.length;_i++){ content=content.replace(_rexArray[_i],"<img src='"+imgsArr[_i]+"'/>"); } return content; } })();