NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Geoguessr more menu items // @namespace kommu // @description Add some usefull menu items on the top menu. // @version 0.0.2 // @include https://www.geoguessr.com/* // @updateURL https://openuserjs.org/meta/kommu/Geoguessr_more_menu_items.meta.js // @run-at document-end // @license MIT // ==/UserScript== (function() { 'use strict'; const html = '<li class="menu_menuItem__Cn2wB"><div class="menu_menuItemLabel__MQkhr"><div class="label_sizeXSmall__mFnrR"><a href="/map-maker">Map maker</a></div></div></li>' + '<li class="menu_menuItem__Cn2wB"><div class="menu_menuItemLabel__MQkhr"><div class="label_sizeXSmall__mFnrR"><a href="/me/maps">MY MAPS</a></div></div></li>' + '<li class="menu_menuItem__Cn2wB"><div class="menu_menuItemLabel__MQkhr"><div class="label_sizeXSmall__mFnrR"><a href="/me/likes">LIKED MAPS</a></div></div></li>' + '<li class="menu_menuItem__Cn2wB"><div class="menu_menuItemLabel__MQkhr"><div class="label_sizeXSmall__mFnrR"><a href="/me/activities">Activities</a></div></div></li>'; const element = document.querySelector("nav[class^=menu_menu__]"); let INITIAL_HTML = ""; if (typeof element != 'undefined') { const OBSERVER = new MutationObserver((mutations, observer) => { const ol_element = document.querySelector("ol[class^=menu_menuItems__]"); if (typeof ol_element != 'undefined' && ol_element.innerHTML != INITIAL_HTML + html) { if (INITIAL_HTML == "") { INITIAL_HTML = ol_element.innerHTML; } ol_element.innerHTML = INITIAL_HTML + html; } }); OBSERVER.observe(element, { attributes: true, childList: true, subtree: true }); } })();