Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A userscript for TamperMonkey that adds a home button to IndieHackers.com
// ==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