Last active
December 1, 2023 08:12
-
-
Save bigwheel/18609f2dae61c7f63ed8 to your computer and use it in GitHub Desktop.
ajaxページ用tampermonkeyテンプレート
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
// ==UserScript== | |
// @name 適当な名前 | |
// @namespace https://github.com/bigwheel とか | |
// @version 1.0 | |
// @description this is description | |
// @author 著者 | |
// @match https://github.com/* 適応したいURLをワイルドカードで | |
// @grant GM_xmlhttpRequest SCPやらajaxのクロスドメイン問題を避けるためにこれを使おう | |
// ==/UserScript== | |
if(document.body && $('ここで指定した要素があると変更を適応')) { | |
MutationObserver = window.MutationObserver || window.WebKitMutationObserver; | |
var observer = new MutationObserver(function(mutations, observer) { | |
// 変更したい内容 | |
}); | |
observer.observe(document, { | |
subtree: true, | |
attributes: true | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment