Skip to content

Instantly share code, notes, and snippets.

@furu
Last active March 17, 2016 15:50
Show Gist options
  • Save furu/61575418bb83019632ef to your computer and use it in GitHub Desktop.
Save furu/61575418bb83019632ef to your computer and use it in GitHub Desktop.
// ==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