8chan-MD5

Display image md5s

目前为 2015-10-26 提交的版本,查看 最新版本

// ==UserScript==
// @name         8chan-MD5
// @version      0.1.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
}

$('.files .file').each(function() {
	$(this).find('.fileinfo .unimportant').append(" MD5: " + window.atob($(this).find('.post-image').attr('data-md5')).hexEncode());
});