したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |
レス数が900を超えています。1000を超えると投稿できなくなるよ。

戦国IXA ツールスレPart48

857名無しさん:2023/11/18(土) 05:20:01 ID:iOR7Vu4I
【inject_moko.js】
const nullthrows = (v) => {
if (v == null) throw new Error("it's a null");
return v;
}

function injectionCode(src) {
const script = document.createElement('script');
script.src = src;
script.onload = function() {
this.remove();
};

nullthrows(document.head || document.documentElement).appendChild(script);
}

+ function injectionJSON(obj, idName) {
+ const json = document.createElement('object');
+ json.setAttribute('id', idName);
+ fetch(obj).then(function(res) {
+ return res.text();
+ }).then(function(txt) {
+ json.innerHTML = txt;
+ obj.onload = function() {
+ this.remove();
+ };
+ nullthrows(document.head || document.documentElement).appendChild(json);
+ });
+ }

injectionCode(chrome.runtime.getURL('/contents/ixa-moko.user.js'));
injectionCode(chrome.runtime.getURL('/contents/ixa-training.user.js'));
injectionCode(chrome.runtime.getURL('/userscript/defense_formation_info.js'));
+ injectionJSON(chrome.runtime.getURL('/contents/ixa-skill_table.json5'), 'mokoSkillCandidateData');


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板