Greasy Fork is available in English.
Add CSS + Check WKOF
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/369353/604090/Jigen%27s%20other%20stuff.js
(function(global) {
var jigen = {
addStyle: addStyle,
checkWKOF: checkWKOF
};
function addStyle(aCss) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (head) {
style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = aCss;
head.appendChild(style);
return style;
}
return null;
}
function checkWKOF(name,version){
if (!window.wkof) {
if (confirm(name + ' requires Wanikani Open Framework.\nDo you want to be forwarded to the installation instructions?'))
window.location.href = 'https://community.wanikani.com/t/instructions-installing-wanikani-open-framework/28549';
return;
}
if(version != undefined){
if (wkof.version.compare_to(version) === 'older') {
if (confirm(name + ' requires Wanikani Open Framework version ' + version + '.\nDo you want to be forwarded to the update page?'))
window.location.href = 'http://greasyfork.icu/en/scripts/38582-wanikani-open-framework';
return;
}
}
}
global.jigen = jigen;
})(jQuery);