Created
February 15, 2022 19:33
-
-
Save arpit/9101122042d49c651f67f2f55c095147 to your computer and use it in GitHub Desktop.
A userscript for TamperMonkey that adds a home button to IndieHackers.com
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 Indiehackers home button | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Add Home to IndieHackers.com | |
// @author Arpit Mathur | |
// @match https://www.indiehackers.com/* | |
// @icon https://www.google.com/s2/favicons?domain=indiehackers.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(function(){ | |
var str = '<li class="nav-menu__item nav-menu__item--forum"><a href="/" class="nav-menu__link ember-view"><span class="nav-menu__label">Home</span></a> </li>' | |
var home = document.createRange().createContextualFragment(str); | |
document.querySelector("ul.nav-menu > li").after(home.firstChild); | |
}, 5000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment