SSC Control Panel Button

Control Panel Button

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
// ==UserScript==
// @name         SSC Control Panel Button
// @namespace    el nino
// @version      1.00
// @author       el nino
// @description   Control Panel Button
// @include      *://www.skyscrapercity.com/*
// @require      https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
// ==/UserScript==

var icon_cp =   'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAYAAADhXXHAAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAV6SURBVFhH1ZlbSG1FHMYPFFERQZeHopd67TnqqcfeCoLyflfwmoqKqQiCvigopKYg9CCKdyUVUbxSifcrQholHnwRFDwqmYqmTt83zVpnXWa5t+69pT74oWvWrJlvz+U/s2Y9SUhICIR3wGegBHSDefAb2AG/gyXwI6gAX4D3ga4cv9Am+uANEAP6wDMg7sEpGAOZ4D2gK98TbaIHL4FssAt0Ru7LIWCLvwl09bnQJmr4BCwDV6Xx8fEiOjpaREREiLCwMBEeHm5iXEdFRYm4uDjXs4qn4Eugq9eGNtFBMTgDtkpokGb4f0lJiWhoaBA9PT1iZGRETE5OitHRUdHX1yeamppEWVmZSElJkflp3FkWuAX14FWg8yDRJipeAe3AVnBMTIxsxYKCAtHV1SV2dnbEzc2N8KW9vT0xNDQkSktLRWRkpJfpX8C7QOfH0+zLYBjYCmOXZmZmyta7uLhQNu6n6+trMTMzI38sW5rDyFHPBtAadiUomoFZAMcbC66vrxeHh4eq2sB0fn4u2traZCvHxsZazZI58Bqw+bJdKHKB+SALYpf19/eraoIrtnJiYqKcA9Z6QROwebNdgI8AY6F8gC3KQjhZQqnV1VWRlJQk54NRt+IrYPqzGn0BcMUxM7PrQ9WiTi0sLMgedIzhffA2cJlNA2ZGTqa6ujpxe3urigu9uru7Zb1WH+A7YDPLMMX1XGbgOE1NTQ3aZPJX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CebXmhrwFtDV50Kb6AN+B4sFnIBHQGfEi78AT7W/ASH9DqaDk8H4wtgFQviFMeHJPyyaCCioespIAAAAAElFTkSuQmCC';

$(function() {
    if (window.self !== window.top) return;

    $("<img>", {
        "src": icon_cp,
        "id": "control-panel",
        "style": "position: fixed; bottom: 80px; right: 30px; height: 43px; width: 43px; cursor: pointer; opacity: 0.5;",
        "width": "43px", "height": "43px"})
        .appendTo("body");

    if($(window).scrollTop() < 100){
        $('#control-panel').hide();
    }

    $(window).on("load resize scroll",function(){
        if($(window).scrollTop() > 100) $('#control-panel').fadeIn();
        else $('#control-panel').fadeOut();
    });

    $("#control-panel").click(function() {
        window.location="//www.skyscrapercity.com/usercp.php";
    });
});