Greasy Fork

Greasy Fork is available in English.

有道云笔记网页剪报

try to take over the world!

当前为 2020-09-27 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         有道云笔记网页剪报
// @namespace    http://greasyfork.icu/users/49622
// @icon         https://note.youdao.com/favicon.ico
// @version      1.0
// @description  try to take over the world!
// @author       过去终究是个回忆
// @include      *
// @grant        GM_registerMenuCommand
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    //注册油猴菜单
    GM_registerMenuCommand('一键收藏', function () {
        if(!document.getElementById('ydNoteWebClipper')) {
            try {
                var a = document.createElement('SCRIPT');
                a.type = 'text/javascript';
                a.src = '//note.youdao.com/yws/YNoteClipper.js?' + (new Date).getTime() / 1e5;
                a.charset = 'utf-8';
                a.onerror = function() {
                    var a = document.createElement('div');
                    a.style.cssText = 'position: absolute;top: 10px;right: 30px;padding: 5px;border-radius: 5px;box-shadow: rgb(92, 184, 229) 0px 0px 2px; -webkit-box-shadow: rgb(92, 184, 229) 0px 0px 2px;background-color: rgba(92, 184, 229, 0.498039) !important;z-index: 999999;';
                    a.innerHTML = amp;
                    document.body.appendChild(a);
                    a.onclick = function() {
                        a.style.display = 'none'
                    };
                    setTimeout(function() {
                        a.click()
                    }, 8e3)
                };
                document.getElementsByTagName('head')[0].appendChild(a)
            } catch(b) {
                alert('该扩展暂不支持收藏该类型https类网站')
                console.error(b)
            }
        }
    });
})();