Fixed the button appearing under other videos

This commit is contained in:
Norbi Peti 2016-06-10 19:23:30 +02:00 committed by GitHub
parent c2c31a5ddf
commit d8fdb458e8

View file

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name MonsterLyrics button // @name MonsterLyrics button
// @namespace https://github.com/NorbiPeti/ // @namespace https://github.com/NorbiPeti/
// @version 0.8 // @version 0.9
// @description Creates a button that searches for a lyrics video! // @description Creates a button that searches for a lyrics video!
// @author NorbiPeti // @author NorbiPeti
// @match https://www.youtube.com/* // @match https://www.youtube.com/*
@ -14,6 +14,9 @@
window.lasttitle=""; window.lasttitle="";
function AddYouTube(addtries) { function AddYouTube(addtries) {
var namecont=document.getElementById("watch7-user-header");
if(namecont===null || namecont.innerHTML.indexOf("Monstercat")==-1)
return;
var title=document.getElementById("eow-title"); var title=document.getElementById("eow-title");
if(title!==null) if(title!==null)
title=title.title; title=title.title;