Show URL instead of QR

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

Versione datata 26/09/2024. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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(){}});
    }
})();