Skip to content

Commit

Permalink
0.3.1b
Browse files Browse the repository at this point in the history
Closes #204
Closes #203
Closes #194
  • Loading branch information
ParticleCore committed Oct 2, 2017
1 parent f8030c1 commit 9e3ad04
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/userscript/Iridium.user.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// ==UserScript==
// @version 0.3.1b
// @version 0.3.2b
// @name Iridium
// @namespace https://github.com/ParticleCore
// @description YouTube with more freedom
// @compatible firefox
// @compatible chrome
// @resource iridium_css https://particlecore.github.io/Iridium/css/Iridium.css?v=0.3.1b
// @resource iridium_css https://particlecore.github.io/Iridium/css/Iridium.css?v=0.3.2b
// @icon https://raw.githubusercontent.com/ParticleCore/Iridium/gh-pages/images/i-icon.png
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/tv*
Expand Down Expand Up @@ -1131,6 +1131,7 @@
},
addToBlacklist: function (event) {

var i;
var ucid;
var brand;
var parent;
Expand Down Expand Up @@ -1158,11 +1159,20 @@
return string.indexOf("UC") === 0;
});

if (ucid[0] && ucid[0].target.browseId) {
for (i = 0; i < ucid.length; i++) {

if (ucid[i] && ucid[i].target && ucid[i].target.browseId) {

if (ucid[i].list && ucid[i].list[0] && ucid[i].list[0].text) {

brand = ucid[i].list[0].text;
ucid = ucid[i].target.browseId;

brand = ucid[0].list[0].text;
break;

ucid = ucid[0].target.browseId;
}

}

}

Expand Down Expand Up @@ -1962,7 +1972,7 @@

return function (method, url) {

if (url.match("get_video_info")) {
if (url.match("get_video_info") && !url.match("el=adunit") && !url.match("ps=gaming")) {

this.addEventListener("readystatechange", context.patchXHR.bind(context));

Expand Down

0 comments on commit 9e3ad04

Please sign in to comment.