Greasy Fork

plume

try to take over the world!

当前为 2017-05-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         plume
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       Jrmc
// @match        http://www.kadokado.com/game/*
// @grant        none
// @require https://code.jquery.com/jquery-3.1.1.min.j
// ==/UserScript==

(function() {
       var url = $("#rankingLink a").attr('href');
       $.ajax({ url: url, success: function(data){
           parser = new DOMParser();
           doc = parser.parseFromString(data, "text/html");
           image_source = doc.querySelector('.flyLeft span img').getAttribute('src');
           if(image_source.indexOf('small_level_0.gif') !== -1){
               score = doc.querySelector('.true .score .num2img');
               var element = '<tr class="even" id="line1"><td class="icon"></td><td class="left"><img alt="step.alt" style="margin: 0px 5px 0px 2px;" src="http://dat.kadokado.com/gfx/icons/plume.gif"/> <span class="num2img"> ' + score.innerHTML + ' </span><td class="right"></td></tr>';
               element = element.replace(/sblue/g, "sred");
               $(element).insertAfter($("#objectives tr").eq(0));
           }
       }});

})();