Skip to content

Instantly share code, notes, and snippets.

Created February 15, 2022 19:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
A userscript for TamperMonkey that adds a home button to
// ==UserScript==
// @name Indiehackers home button
// @namespace
// @version 0.1
// @description Add Home to
// @author Arpit Mathur
// @match*
// @icon
// @grant none
// ==/UserScript==
(function() {
'use strict';
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