Welcome to Assassin's Creed Wiki! Log in and join the community.

User:SlyAceZeta/common.js: Difference between revisions

From the Assassin's Creed Wiki
Jump to navigation Jump to search
imported>SlyAceZeta
mNo edit summary
imported>SlyAceZeta
Blanked the page
Line 1: Line 1:
var mutNode = document.getElementsByClassName('wds-global-navigation__search-input')[0];
var mutConfig = { attributeFilter: ['placeholder'] };


var mutObserver = new MutationObserver(mutCallback);
function mutCallback(mutations) {
for (let mutation of mutations) {
if (mutation.type === 'attributes') {
mutNode.setAttribute('placeholder', "Search Assassin's Creed Wiki...");
}
}
}
mutObserver.observe(mutNode, mutConfig);

Revision as of 06:04, 4 March 2021