4chan json Image Viewer - Thread Float Link

Float URL to View Thread using "4chan json Image Viewer" (https://greasyfork.org/en/scripts/418726-4chan-json-image-viewer)

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         4chan json Image Viewer - Thread Float Link
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  Float URL to View Thread using "4chan json Image Viewer" (https://greasyfork.org/en/scripts/418726-4chan-json-image-viewer)
// @author       Czy [2020]
// @match        https://boards.4chan.org/*/thread/*
// @match        https://boards.4channel.org/*/thread/*
// @grant        none
// ==/UserScript==

// #######REQUIRES "4chan json Image Viewer" for full use.

// -- keep up to date, may add New Functions in the future.

(function() {
    'use strict';


    var el ;
function dirco(a){ return window.location.pathname.split("/")[a]};
// displays Thread number (Lower right corner)
var dirhref = dirco(3); // thread number
var dirthread = dirco(1); // thread name


el =`
	<div style="background:#eeeeee; position:fixed; bottom:0px; right:0px;">
        <a href="https://a.4cdn.org/`+dirthread+`/thread/`+dirhref+`.json" target="_blank" onclick="window.close();">
            <h1>ImgViewer</h1>
        </a>
    </div>`;

//ADDS el to PAGE
document.body.innerHTML += el;
})();