mirror of
https://github.com/novitechie/jetbra
synced 2024-12-22 06:15:45 +00:00
油猴脚本
This commit is contained in:
parent
36dcf2b5f1
commit
35d6b7496f
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name JetBra
|
// @name JetBra
|
||||||
// @namespace https://github.com/novice88/jetbra
|
// @namespace https://github.com/novice88/jetbra
|
||||||
// @version 0.2
|
// @version 1.1
|
||||||
// @license MIT
|
// @license MIT
|
||||||
// @description 添加一个按钮,点击获取插件的激活码
|
// @description 添加一个按钮,点击获取插件的激活码
|
||||||
// @author novice.li
|
// @author novice.li
|
||||||
@ -197,7 +197,6 @@ var elmGetter = function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}();
|
}();
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
GM_addStyle(`
|
GM_addStyle(`
|
||||||
@ -227,6 +226,7 @@ var elmGetter = function() {
|
|||||||
const pluginId = metaTag.getAttribute('content')
|
const pluginId = metaTag.getAttribute('content')
|
||||||
|
|
||||||
let pluginDetail = await fetch('https://plugins.jetbrains.com/api/plugins/' + pluginId).then(r => r.json());
|
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');
|
const parentElement = await elmGetter.get('.plugin-header__controls-panel > div:first-child');
|
||||||
|
|
||||||
let newElement = document.createElement('div');
|
let newElement = document.createElement('div');
|
||||||
@ -271,6 +271,5 @@ var elmGetter = function() {
|
|||||||
window.alert('激活码已复制到剪切版');
|
window.alert('激活码已复制到剪切版');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user