您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display image md5s
当前为
// ==UserScript== // @name 8chan-MD5 // @version 0.2.1 // @description Display image md5s // @author Anonymous // @match *://8ch.net/* // @grant none // @namespace https://greasyfork.org/users/18941 // ==/UserScript== String.prototype.hexEncode = function(){ var hex, i; var result = ""; for (i=0; i<this.length; i++) { hex = this.charCodeAt(i).toString(16); result += hex; } return result } function applyMD5(root) { $(root).find('.files .file').each(function() { $(this).find('.fileinfo .unimportant').append("<br/>MD5: " + window.atob($(this).find('.post-image').attr('data-md5')).hexEncode()); }); } applyMD5(document.body); // apply md5 to all posts now. var observer = new MutationObserver(function(mutations) { // add md5 to any posts that may be added. mutations.forEach(function(mutation) { var newNodes = mutation.addedNodes; if (newNodes !== null) { var $nodes = $(newNodes); $nodes.each(function() { applyMD5(this); }); } }); }); observer.observe($('.thread')[0], {attributes: true, childList: true, characterData: true});