Simple Redirection Buttons for Pahe

Simplify link jumping on pahe websites.

Verze ze dne 14. 04. 2022. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Simple Redirection Buttons for Pahe
// @namespace    https://naeembolchhi.github.io/
// @version      0.52
// @description  Simplify link jumping on pahe websites.
// @author       NaeemBolchhi
// @match        https://intercelestial.com/*
// @match        https://linegee.net/*
// @license      GPL-3.0-or-later
// @icon         https://pahe.li/wp-content/uploads/2017/12/favicon.ico
// @run-at       document-idle
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function addStyle(css) {
        var head, style;
        head = document.querySelector('head');
        if (!head) {
            window.location.reload();
        }
        style = document.createElement('style');
        style.innerHTML = css;
        head.appendChild(style);
    }

    if (window.location.hostname == "linegee.net") {
        addStyle(`.btn.btn-primary.btn-xs {
                    position: fixed;
                    top: 0;
                    left: 0;
                    height: 100%;
                    width: 100%;
                    z-index: 99999999999 !important;
                    opacity: 1 !important;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 4rem;
                    border-radius: 0;
                  }
                  #backdrop {
                    position: fixed;
                    top: 0;
                    left: 0;
                    height: 100%;
                    width: 100%;
                    z-index: 999999999 !important;
                    background: black;
                    opacity: 1;
                  }
                  * {
                    overflow: hidden;
                  }`);
    } else if (window.location.hostname == "intercelestial.com") {
        addStyle(`.qc-cmp2-persistent-link {
                    z-index: 0;
                  }
                  #qc-cmp2-container {
                    display: none;
                  }
                  div.wait > center > img {
                    position: fixed;
                    left: 0;
                    top: 0;
                    height: 100%;
                    width: 100%;
                    z-index: 99999999999 !important;
                    background: green;
                    opacity: 1 !important;
                  }
                  #generater > img {
                    display: none;
                  }
                  #generater {
                    position: fixed;
                    height: 100%;
                    width: 50%;
                    z-index: 99999999999 !important;
                    background: red;
                    opacity: 1 !important;
                  }
                  #showlink {
                    position: fixed;
                    height: 100%;
                    width: 50%;
                    z-index: 99999999999 !important;
                    background: blue;
                    opacity: 1 !important;
                  }
                  @media only screen and (orientation: landscape) {
                    #generater {
                      left: 0;
                    }
                    #showlink {
                      right: 0;
                    }
                    #generater, #showlink {
                      top: 0;
                      height: 100%;
                      width: 50%;
                    }
                  }
                  @media only screen and (orientation: portrait) {
                    #generater {
                      top: 0;
                    }
                    #showlink {
                      bottom: 0;
                    }
                    #generater, #showlink {
                      left: 0;
                      height: 50%;
                      width: 100%;
                    }
                  }
                  #backdrop {
                    position: fixed;
                    top: 0;
                    left: 0;
                    height: 100%;
                    width: 100%;
                    z-index: 999999999 !important;
                    background: black;
                    opacity: 1;
                  }
                  * {
                    overflow: hidden;
                  }`);
    }

    const makeZERO = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDcuMS1jMDAwIDc5LmVkYTJiM2ZhYywgMjAyMS8xMS8xNy0xNzoyMzoxOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIzLjEgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjRCQkJBQTQyQkFCMDExRUM4MjFEOUQ3MEUxNDBGODc2IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjRCQkJBQTQzQkFCMDExRUM4MjFEOUQ3MEUxNDBGODc2Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEJCQkFBNDBCQUIwMTFFQzgyMUQ5RDcwRTE0MEY4NzYiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEJCQkFBNDFCQUIwMTFFQzgyMUQ5RDcwRTE0MEY4NzYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7pqlcvAAAAEElEQVR42mL4//8/A0CAAQAI/AL+26JNFgAAAABJRU5ErkJggg==";
    try {
        document.querySelector('div.wait center img').src = makeZERO;
    } catch {}
    try {
        document.querySelector('#showlink').src = makeZERO;
    } catch {}
    try {
        var body, element;
        body = document.querySelector('body');
        if (!body) {
            window.location.reload();
        }
        element = document.createElement('div');
        element.id = "backdrop";
        body.appendChild(element);
    } catch {}

})();