mirror of
https://github.com/noviceli/jetbra
synced 2024-11-22 05:06:24 +03:00
油猴脚本
This commit is contained in:
parent
36dcf2b5f1
commit
35d6b7496f
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue