Skip to content

Instantly share code, notes, and snippets.

@hirogasa
Last active December 30, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirogasa/7788847 to your computer and use it in GitHub Desktop.
Save hirogasa/7788847 to your computer and use it in GitHub Desktop.
ニコニコ動画のコミュニティ動画から通常の動画ページに自動でリダイレクトするUserScript http://userscripts.org/scripts/show/134454
// ==UserScript==
// @name Nicovideo Community's Video Redirecter
// @version 0.1
// @namespace http://blog.livedoor.jp/hirogasa/
// @description ニコニコ動画のコミュニティ動画から通常の動画ページに自動でリダイレクトします。
// @include http://www.nicovideo.jp/watch/*
// ==/UserScript==
(function() {
if(document.body.innerHTML.match(/<a href="watch\/([^"]+)">元の動画を見る/)){
location.href = "http://www.nicovideo.jp/watch/" + RegExp.$1;
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment