油猴脚本

This commit is contained in:
novice.li 2023-11-26 17:34:36 +08:00
parent 36dcf2b5f1
commit 35d6b7496f
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,7 @@
// ==UserScript==
// @name JetBra
// @namespace https://github.com/novice88/jetbra
// @version 0.2
// @version 1.1
// @license MIT
// @description 添加一个按钮,点击获取插件的激活码
// @author novice.li
@ -197,7 +197,6 @@ var elmGetter = function() {
}
};
}();
(async function () {
'use strict';
GM_addStyle(`
@ -227,6 +226,7 @@ var elmGetter = function() {
const pluginId = metaTag.getAttribute('content')
let pluginDetail = await fetch('https://plugins.jetbrains.com/api/plugins/' + pluginId).then(r => r.json());
const parentElement = await elmGetter.get('.plugin-header__controls-panel > div:first-child');
let newElement = document.createElement('div');
@ -271,6 +271,5 @@ var elmGetter = function() {
window.alert('激活码已复制到剪切版');
}
});
})
})();