Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Made YouTube Center ready for new version. Also updated translations.
Browse files Browse the repository at this point in the history
  • Loading branch information
YePpHa committed Aug 11, 2013
1 parent 4ea49bf commit 8f2a748
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 110 deletions.
Binary file modified Translation.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@ant-version@=1.33.0
@ant-revision@=123
@ant-revision@=125
Binary file modified dist/YouTubeCenter.crx
Binary file not shown.
Binary file modified dist/YouTubeCenter.mxaddon
Binary file not shown.
Binary file modified dist/YouTubeCenter.oex
Binary file not shown.
52 changes: 15 additions & 37 deletions dist/YouTubeCenter.safariextension/YouTubeCenter.user.js

Large diffs are not rendered by default.

Binary file modified dist/YouTubeCenter.safariextz
Binary file not shown.
52 changes: 15 additions & 37 deletions dist/YouTubeCenter.user.js

Large diffs are not rendered by default.

Binary file modified dist/YouTubeCenter.xpi
Binary file not shown.
2 changes: 1 addition & 1 deletion language.json

Large diffs are not rendered by default.

46 changes: 12 additions & 34 deletions src/YouTubeCenter.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5080,7 +5080,7 @@
dbg.settings = ytcenter.settings;
dbg.ytcenter = {};
dbg.ytcenter.video = ytcenter.video;
dbg.ytcenter.signatureDecoder = ytcenter.utils._signatureDecipher;
dbg.ytcenter.signatureDecipher = ytcenter.utils._signatureDecipher;
dbg.ytcenter._signatureDecipher = ytcenter.utils.__signatureDecipher;
try {
dbg.ytcenter.player = {};
Expand Down Expand Up @@ -8100,7 +8100,7 @@
if (response.responseText.match(regex2)) {
con.log("[updateSignatureDecipher] First regex");
a = regex2.exec(response.responseText)[0].split("{")[1].split("}")[0].split(";");
ytcenter.utils._signatureDecipher = []; // Clearing signatureDecoder
ytcenter.utils._signatureDecipher = []; // Clearing signatureDecipher
for (i = 1; i < a.length-1; i++) {
b = a[i];
if (b.indexOf("a.slice") !== -1) { // Slice
Expand Down Expand Up @@ -9055,7 +9055,6 @@
});
} else {
var data = $LoadData(ytcenter.storageName, "{}");
con.log(data);
var loaded = JSON.parse(data);
for (var key in loaded) {
if (loaded.hasOwnProperty(key)) {
Expand Down Expand Up @@ -9365,8 +9364,8 @@
channel_bgcolor: "default",
player_wide: false,
"resize-default-playersize": 'default',
"resize-small-button": "default_small",
"resize-large-button": "default_large",
"resize-small-button": "default_fit_to_content",
"resize-large-button": "default_720",
"resize-playersizes": [
{
id: "default_small",
Expand All @@ -9389,7 +9388,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_fit_to_content",
config: {
customName: "Fit to Content",
width: "985px",
Expand All @@ -9400,7 +9399,7 @@
scrollToPlayerButton: false,
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_collapse_player",
config: {
customName: "Collapse The Player",
width: "640px",
Expand All @@ -9411,7 +9410,7 @@
scrollToPlayerButton: false,
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_720",
config: {
customName: "720p",
width: "1280px",
Expand All @@ -9422,7 +9421,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_1080",
config: {
customName: "1080p",
width: "1920px",
Expand All @@ -9433,7 +9432,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_70_percent",
config: {
customName: "70%",
width: "70%",
Expand All @@ -9444,7 +9443,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_80_percent",
config: {
customName: "80%",
width: "80%",
Expand All @@ -9455,7 +9454,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_90_percent",
config: {
customName: "90%",
width: "90%",
Expand All @@ -9466,7 +9465,7 @@
scrollToPlayerButton: false
}
}, {
id: ytcenter.utils.assignId("default_"),
id: "default_100_percent",
config: {
customName: "Fill",
width: "100%",
Expand Down Expand Up @@ -13568,27 +13567,6 @@
i1 = content.indexOf("<script>var ytplayer = ytplayer || {};ytplayer.config = ");
i2 = content.indexOf(";</script>");
data.html.content = content.substring(0, i1 + "<script>var ytplayer = ytplayer || {};ytplayer.config = ".length) + JSON.stringify(swfcfg) + content.substring(i2);
/*
var getElementById = function(node, id){
if (node && node.id === id)
return node;
var i, child;
for (i = 0; i < node.childNodes.length; i++) {
child = getElementById(node.childNodes[i], id);
if (child) return child;
}
},
s = document.createElement("div");
s.innerHTML = content;

data.html["player-branded-banner"] = getElementById(s, "player-branded-banner").innerHTML;
data.html["player-unavailable"] = getElementById(s, "player-unavailable").innerHTML;
data.html["playlist"] = getElementById(s, "playlist").innerHTML;
data.html["playlist-tray"] = getElementById(s, "playlist-tray").innerHTML;

data.attr['player-unavailable'] = {"class": getElementById(s, "player-unavailable").getAttribute("class")};

s = null;*/
} catch (e) {
con.error(e);
}
Expand Down

0 comments on commit 8f2a748

Please sign in to comment.