YePpHa / YouTubeCenter

YouTube Center is a userscript designed to expand the functionality of YouTube. It includes the ability to download the video you're watching, auto selecting your preferred video quality and much more.
MIT License
2.89k stars 520 forks source link

Developer Version #520 won't load in Opera <15 #1787

Open mikewinq opened 9 years ago

mikewinq commented 9 years ago

Developer Version #520 won't load in Opera <15

Anyone know were /if a backup of older releases are avalible?

Yonezpt commented 9 years ago

@mikewinq You can find the older releases in the history panel located here: https://github.com/YePpHa/YouTubeCenter/commits/master/dist/YouTubeCenter.safariextz

Wrong browser, YePpHa linked the correct one below.

YePpHa commented 9 years ago

This is for Opera https://github.com/YePpHa/YouTubeCenter/commits/master/dist/YouTubeCenter.oex

Yonezpt commented 9 years ago

Oh, sorry, got Opera mixed with Safari for some odd reason...

mikewinq commented 9 years ago

525 did not fix this!

raszpl commented 9 years ago

its #1625 all over again last loading (but not working ok, layout is off, video window is almost off screen) build is 516, 517 and up doesnt load at all.

last working 100% ok build is 501 : https://github.com/YePpHa/YouTubeCenter/blob/8df3ea174cd119e9845ab0016e40dbe84cfdd8e3/dist/YouTubeCenter.oex

502-516 broken layout 517-525 doesnt load at all

raszpl commented 9 years ago

narrowed it down to this line:

 if ((typeof key === "string" && key !== "" && typeof value === "function") || value instanceof Document) {

Opera crashes JS on "value instanceof Document"

broken layout is due to

.watch-stage-mode .player-width { 
left: -427px;

no idea where this comes from

raszpl commented 9 years ago

about the "502-516 broken layout", I played a bit with it and its ok in "small - centered" mode, and when dynamic resizing is turned off, only resizing to Large moves video offscreen. Fullscreen browser and windowed makes no difference, my resolution is 1600x1200 so plenty of space.

all in all its easy to make build 525 work, just resize to small and delete "value instanceof Document" in one place

raszpl commented 9 years ago

build 531 SAME bug, changing:

if ((typeof key === "string" && key !== "" && typeof value === "function") || value instanceof Document) {

to

    if ((typeof key === "string" && key !== "" && typeof value === "function")) {

makes 531 load ok on opera 12.17

mikewinq commented 9 years ago

Tried that and it did not work! Had to go back to v.508 I extracted the files from the .oex file and edited the YouTubeCenter.js with the value posted above and than archived the edited file in a new zip file, renamed it .oex and installed. But YTC v.531 still wont load in Opera 12.17 32bit

raszpl commented 9 years ago

opera: Version 12.17 Build 1863 Platform Win32

all i did to make it work:

C:\Users\bofh\Desktop>diff  -u  YouTubeCenter.js YouTubeCenter_corrected.js
--- YouTubeCenter.js    2015-07-18 17:29:12 +0200
+++ YouTubeCenter_corrected.js  2015-07-20 11:01:22 +0200
@@ -26282,7 +26282,7 @@
   }

   function jsonReplacer(key, value) {
-    if ((typeof key === "string" && key !== "" && typeof value === "function") || value instanceof Document) {
+    if ((typeof key === "string" && key !== "" && typeof value === "function")) {
       return value.toString();
     }
     return value;