tianyunperfect 3 years ago
parent
commit
d91a5ac514
2 changed files with 8 additions and 4 deletions
  1. 1 1
      tmp/monkey/A1.js
  2. 7 3
      tmp/monkey/AAAAA-复制标题-到memory.js

+ 1 - 1
tmp/monkey/A1.js

@@ -5,7 +5,7 @@
 // @version           1.0.0
 // @update            2021-07-08 16:16:14
 // @include           *www.baidu.com*
-// @require           http://www.tianyunperfect.cn:3001/tianyunperfect/web-base/raw/369c684a3d4f12d24ef0e6edacde733e3a6e2d00/tmp/monkey/util.js
+// @require           http://www.tianyunperfect.cn:3001/tianyunperfect/web-base/raw/master/tmp/monkey/util.js
 
 // ==/UserScript==
 (async () => {

+ 7 - 3
tmp/monkey/AAAAA-复制标题-到memory.js

@@ -10,14 +10,14 @@
 // @version     1.0
 // @author      tianyunperfect
 // @require     https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js
-// @require     http://www.tianyunperfect.cn:3001/tianyunperfect/web-base/raw/369c684a3d4f12d24ef0e6edacde733e3a6e2d00/tmp/monkey/util.js
+// @require     http://www.tianyunperfect.cn:3001/tianyunperfect/web-base/raw/master/tmp/monkey/util.js
 // @description 2021/1/30 下午7:09:51
 // ==/UserScript==
 
 (function () {
     'use strict';
     GM_registerMenuCommand("!!!复制并加到memory", to_memory)
-    GM_registerMenuCommand("!!!复制标题和 url", myCopy(`${pre_str}<a href="${location.href}">${document.title}</a>`))
+    GM_registerMenuCommand("!!!复制标题和 url", copyTitle)
 
     function to_memory() {
         let url = location.href;
@@ -46,10 +46,14 @@
         }
     }
 
+    function copyTitle() {
+        myCopy(`<a href="${location.href}">${document.title}</a>`)
+    }
+
     document.onkeydown = function (ev) {
         if (ev.key === 'c' && ev.shiftKey) {
             ev.preventDefault() // 关闭浏览器快捷键
-            myCopy(`${pre_str}<a href="${location.href}">${document.title}</a>`)
+            copyTitle()
         }
 
     }