jisho.org Remove Furigana From Copy Paste

Removes furigana from copy and paste text.

目前为 2019-04-17 提交的版本。查看 最新版本

// ==UserScript==
// @name         jisho.org Remove Furigana From Copy Paste
// @namespace    kaziocore
// @version      1.0
// @description  Removes furigana from copy and paste text.
// @author       https://github.com/philipnery
// @match        https://jisho.org/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener('copy', function (e) {
        e.preventDefault();

        var furiganas = document.getElementsByClassName('furigana');
        for (let i = 0; i < furiganas.length; i++) {
          furiganas[i].style.display = 'none';
        }

        e.clipboardData.setData('text', window.getSelection().toString());
        for (let i = 0; i < furiganas.length; i++) {
          furiganas[i].style.removeProperty('display');
        }
    });
})();


QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址