Last active
December 10, 2015 16:59
-
-
Save justinwoo/4464624 to your computer and use it in GitHub Desktop.
moves the playlist mathead so that the "edit playlist" and "video manager" buttons and its bar are in a more sensible place (imo). Userscript page http://userscripts.org/scripts/show/155787
This file contains 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 Youtube Playlist Masthead Relocator | |
// @namespace http://www.github.com/kimagure | |
// @description moves the playlist mathead so that the "edit playlist" and "video manager" buttons and its bar are in a more sensible place (imo) | |
// @include http://www.youtube.com/playlist?* | |
// @version dev | |
// ==/UserScript== | |
function relocations() { | |
var element = document.getElementById("masthead-subnav"); | |
if (element == null) { | |
relocatepleheading(); | |
return; | |
} | |
var mycopy = element.outerHTML; | |
element.outerHTML = ""; | |
var playlistcontent = document.getElementById("playlist-pane-container"); | |
var plchtml = playlistcontent.outerHTML; | |
plchtml = plchtml.substring(0,35) + mycopy + plchtml.substring(36); | |
playlistcontent.outerHTML = plchtml; | |
} | |
function relocatepleheading() { | |
var element = document.getElementById('playlist-editor-heading'); | |
if (element == null) { | |
return; | |
} | |
var mycopy = element.outerHTML; | |
element.outerHTML = '' | |
var playlistcontent = document.getElementById("playlist-pane-container"); | |
var plchtml = playlistcontent.outerHTML; | |
plchtml = plchtml.substring(0,35) + mycopy + plchtml.substring(36); | |
playlistcontent.outerHTML = plchtml; | |
} | |
relocations(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment