汲汲營營大報社
// ==UserScript== // @namespace https://greasyfork.org/zh-TW/scripts/408244 // @name 今年一定島 搜尋 // @description 汲汲營營大報社 // @author 稻米 // @version 2020.10.06.0010.build16299 // @include *://*.komica.org/00/* // @exclude *://*.komica.org/00/src/* // @exclude *://*.komica.org/00/thumb/* // @exclude *.jpg // @exclude *.png // @exclude *.webm // @grant none // ==/UserScript== $(document).ready(function() { poi(); }); function poi(){ var aa =$('div#banner').find('div.bar_admin'); //console.log( aa ); if( aa.text() == "搜尋" ){ poi2(); } } function poi2(){ var bb =$('div#search_result').find('div.threadpost').find('a'); var FFF; $.each(bb, function( index, item ) { FFF = $(item).attr('href'); $(item).after('<span class="cls200805"></span>'); let 旁邊的=$(item).next("span.cls200805"); console.log( FFF ); console.log( 旁邊的 ); var str=FFF; var re = /res=([0-9]+)/; var found = str.match(re); console.log( found ); if(found){ // }else{ return; } FFF=found[1]; $(旁邊的).text('->'+FFF); FFF=parseInt(found[1], 10); FFF=FFF.toString(16); console.log( FFF ); FFF=FFF.substr(-3); console.log( FFF ); $(旁邊的).css({ backgroundColor: '#'+FFF, }); }); }