Show URL instead of QR

直接显示二维码中的链接,用手机扫描太麻烦了。比如动漫领域的磁链...

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         Show URL instead of QR
// @namespace    http://tampermonkey.net/
// @version      0.2·
// @description  直接显示二维码中的链接,用手机扫描太麻烦了。比如动漫领域的磁链...
// @author       etng
// @match        *://dmly.me/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=dmly.me
// @grant        GM_notification
// ==/UserScript==

(function() {
    'use strict';
    var $ = unsafeWindow.jQuery;
    var cnt = 0
    $('img[src^="https://api.qrserver.com/v1/create-qr-code/"]').each((k,v)=>{
        var a=$(v);
        var u=new URL(a.attr('src'))
        var link = u.searchParams.get('data')
        a.after($('<div/>').append($('<a>').attr('href', link).text(link)))
        cnt +=1
    })
    if(cnt>0){
        GM_notification({text: `成功提取${cnt}个QR`, timeout: 800, onclick: function(){}});
    }
})();