Add the link of "Advanced search" to the GitHub header

try to take over the world!

  1. // ==UserScript==
  2. // @name Add the link of "Advanced search" to the GitHub header
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @description try to take over the world!
  6. // @author 9sako6
  7. // @match https://github.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. let navElem = document.querySelector("body > div.position-relative.js-header-wrapper > header > div.Header-item.Header-item--full > nav");
  14. console.log(navElem);
  15. navElem.insertAdjacentHTML('beforeend', `<a class="js-selected-navigation-item Header-link py-lg-3 d-inline-block" href="/search/advanced">Advanced search</a>`);
  16. })();