Last active
October 8, 2019 08:00
-
-
Save panakuma/ef25eef7afc4c479d3a9a02314a803db to your computer and use it in GitHub Desktop.
東京工科大学 学生ポータルのこうかとんをハメドリ君にする拡張
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("load", () => { | |
const kokatonDOM = document.getElementById("kokaton"); | |
console.log(kokatonDOM); | |
//とりあえずDOMを消す | |
kokatonDOM.innerHTML = ""; | |
//バルーンを作る | |
const balloon = document.createElement("div"); | |
balloon.innerHTML = "<p>東京工科大学公式マスコットキャラクター ハメドリくんだハメ!</p>"; | |
balloon.setAttribute("id", "kt_balloon"); | |
kokatonDOM.appendChild(balloon); | |
// ハメドリ君を作る | |
const hamedoriImg = document.createElement("img"); | |
hamedoriImg.setAttribute("src", "https://qruppo.com/products/nukitashi/img/character/character10.png"); | |
hamedoriImg.setAttribute("width", "80px"); | |
kokatonDOM.appendChild(hamedoriImg); | |
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "こうかとんをハメドリ君にするやつ", | |
"version": "1.0.0", | |
"manifest_version": 2, | |
"description": "こうかとんをハメドリ君にするやつ", | |
"content_scripts": [{ | |
"matches": ["https://service.cloud.teu.ac.jp/*"], | |
"js": [ | |
"content.js" | |
], | |
"run_at": "document_end", | |
"all_frames": true | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment