磁力mp4搜索

快速搜索想看的视频,书籍,软件的磁力链接,方便,节省时间

// ==UserScript==
// @name         磁力mp4搜索
// @namespace    https://cilimp4.com
// @version      0.1.3
// @description  快速搜索想看的视频,书籍,软件的磁力链接,方便,节省时间
// @author       Fructose
// @match        *://*/*
// @grant        GM_addStyle
// @require      https://code.jquery.com/jquery-3.1.0.js
// @license      MIT
// @icon         https://s1.ax1x.com/2018/12/21/FsZEvT.png
// ==/UserScript==

(function() {
    'use strict';
    GM_addStyle(`#zizhuIcon {width: 36px; height: 36px;box-shadow: 2px 2px 4px rgba(12,12,12,.3); border-radius: 5px; cursor: pointer;}
                 #zizhuMain {position: absolute; top: 0; left: 0; width: 0; height: 0; background: #fff; font-size: 12px; opacity: 0;z-index: 9999;display:none;box-sizing: border-box;}`)
    var innerIcon = "<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAMAAAC7m5rvAAACc1BMVEUAAAAAAAAAAAAAAAAAAAAFAgIGBAQKCgoHBgUAAAABAgIAAAAAAAAIBgUAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAAAAHAwMAAAAAAAAAAAAEAwMCAAAAAAAAAAAAAAABAgIBAAAAAAAAAAAAAAADAAAHAwMZGhoAAAAAAAAAAAAAAAAAAAAAAAAHBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABtrboAAAAAAABbiZQAAAAAAAAAAAAAAAAAAAAdFhYAAAAAAABTeYFGISA3PkEnJignJigAAAAlICAAAAAAAAAXCQkZFRVjmKNkmqZej5pAV1w4UFYzPEBQJyVeKSdAVVs3QkU+IB8AAAAsLzIxMzUAAAAdFxcqHx8AAAAaDg0lGxsAAAAiFxcvIB4RAgEkICAfExMpIiQAAAA4TFJwssF1MC1oxtjXWVCZPTjQTkehPjmjNi9qpbFPc3tYhY9ZhI2YLCVMa3NgKyk7S09PcXl6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esigzWxyQcNYxV8xhkMUCP+rwonnTBgyYNmTO/EuXFydsHt6uAlCWEABaJkxhXUgg0phXjuUkMslF+ZcjgAPjnxvFATSlPqcZ8DRWUoX9ViIBDlE5ph7a3Qygs9DpEsQCRMMVglbVJl6uA4hxKwq62msAgKhD704l/FFkhI+a3FVqiUjTsXAV06j600TrMkcRlZU9GwlJT2tDUecpDQ1Wr/QneYtiVvTQ1zf4W/y6CSkZJQtRYnSBs/JwPyGWMTxUAfIdsgy3zvvTxcsAAAAASUVORK5CYII=' id='zizhuIcon' alt='磁力mp4搜索' title='磁力mp4搜索'/>"
    var txt = ''
    var odom = document.createElement("div");
    odom.id = "zizhuMain";
    odom.innerHTML = innerIcon;
    document.body.appendChild(odom);
    document.querySelector("#zizhuMain").addEventListener("click",searchSetting);
    function searchSetting(){
       //location.href="https://cilimp4.com/s/"+txt
        if(txt.length != 0){
            //window.open('http://www.zhizhud.com/so/'+txt+'-first-asc-1')
            window.open('https://cilimp4.com/s/'+txt+'/time-1.html')
        }
    }
    $('body').mouseup(function(e){
        txt = window.getSelection?window.getSelection().toString():document.selection.createRange().text;
        let sel = window.getSelection()
        var range = sel.getRangeAt(0);
        var rect = range.getBoundingClientRect();
        var scrollH = $(document).scrollTop();
        var scrollW = $(document).scrollLeft();
        if(txt && txt.length != 0){
            $('#zizhuMain').css({ "top": rect.y+scrollH+20+'px', "left": rect.x+scrollW+'px','opacity':1,'width':'36px','height':'36px','display': 'block' })
        } else {
            $('#zizhuMain').css({'opacity':0 ,'width':'0','height':'0','display': 'none' })
        }
    })
})();