Last active
March 17, 2016 15:50
-
-
Save furu/61575418bb83019632ef to your computer and use it in GitHub Desktop.
This file contains hidden or 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 inal | |
// @namespace https://tfrkd.org/ | |
// @version 0.4 | |
// @description Inject anime link into header on niconico | |
// @author furu | |
// @match http://*.nicovideo.jp/* | |
// @grant none | |
// @noframes | |
// ==/UserScript== | |
'use strict'; | |
var first = document.querySelector('ul.siteHeaderGlovalNavigation').firstElementChild; | |
var li = document.createElement('li'); | |
var a = document.createElement('a') | |
a.href = 'http://ch.nicovideo.jp/portal/anime'; | |
var span = document.createElement('span'); | |
span.innerText = 'アニメ'; | |
a.appendChild(span); | |
li.appendChild(a); | |
first.parentNode.insertBefore(li, first.nextSibling); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment