JPDB Link Remover

If you're using JPDBreader to review from the a vocab page in JPDB on mobile, tapping on a word to bring up the overlay causes the link to be followed. This script removes links from all JPDB deck pages. If you only want links removed from the All Vocab page, replace "https://jpdb.io/deck*" on line 6 with "https://jpdb.io/deck?id=gloabl"

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         JPDB Link Remover
// @namespace    uchisen.com
// @version      2024-11-04
// @description  If you're using JPDBreader to review from the a vocab page in JPDB on mobile, tapping on a word to bring up the overlay causes the link to be followed. This script removes links from all JPDB deck pages. If you only want links removed from the All Vocab page, replace "https://jpdb.io/deck*" on line 6 with "https://jpdb.io/deck?id=gloabl"
// @author       Togeffet
// @match        https://jpdb.io/deck*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=jpdb.io
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const vocabulary = document.getElementsByClassName('vocabulary-spelling');

    for (let i = 0; i < vocabulary.length; i++) {
        const link = vocabulary[i].getElementsByTagName('a')[0];

        link.removeAttribute('href'); // Remove link
        link.style.cursor = "default"; // Change cursor to default (just felt better imo)
        link.style.borderBottom = 'none'; // Remove link border on hover, since it's not a link anymore
    }
})();