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 519 forks source link

script loaded but not working in chrome canary 60.0.3075.0 #2407

Open sdsucks opened 7 years ago

sdsucks commented 7 years ago

same thing in chromium 60.0.3077.0 works in chromium 60.0.3073.0 though

comedinha commented 7 years ago

Same problem here... (60.0.3076.0)

falcon4fun commented 7 years ago

As I understand, there is the problem in CSP. Maybe Dev will find better solution.

I fixed by:

  1. Change chrome://flags/#extension-content-verification to Bootstrap
  2. Change "con.log" to "console.log" in YouTubeCenter.js.

And it will work : ) Proof: https://i.imgur.com/dDI8dzc.png

sdsucks commented 7 years ago

@falcon4fun thank you, that works! youtubecenter is back in action

InnZumNiaK commented 7 years ago

@falcon4fun

hoy do you do this

Change "con.log" to "console.log" in YouTubeCenter.js.

i think i didn't understand this step, can you upload your fixed YouTubeCenter.js to replace mine?

falcon4fun commented 7 years ago

@InnZumNiaK https://i.imgur.com/RiKSLeg.png

InnZumNiaK commented 7 years ago

it works again! thanks @falcon4fun

p1nkyy commented 7 years ago

Hello, @falcon4fun, can you help me with Firefox version? Tried changing all the con.log to console.log but I didn't know the next step's equivalent in Firefox. Thank you so much!

falcon4fun commented 7 years ago

@p1nkyy Sorry, I don't use FF :{ Wait for DEV.

CollinChaffin commented 7 years ago

Issue: YTC in TamperMonkey on Chrome Broken

For those on Tampermonkey Chrome (I'm on TM stable - Chrome DEV x64 but should work on all), here is a workaround I have come up with that I can now confirm works 100% of the time - until the perm updates can be made:

Because of the size and parsing issues from local file URL with TM, you will need to perform the following steps below. This is to avoid having to increment the version number which will just cause issues later when @YePpHa can make the updates. You should already know how to perform a local TM full backup but if you do not - "Utilities" tab, check the box for "Include Tampermonkey settings", and click on the "File"/"Export" button and select a local zip file. You will use this below and should also keep a copy aside as a backup.

Workaround Steps to Re-Enable YTC

  1. Open the fresh backup zip
  2. Sort by file name and click CTRL-A hold CTRL and DESELECT ONLY the THREE files titled "YouTube Center Developer Build.XXX"
  3. Press DELETE to now leave only the THREE "YouTube Center Developer Build.XXX" files in the zip
  4. Drag/Extract and Edit the "YouTube Center Developer Build.user.js" with an editor capable of performing a single REPLACE ALL operation to replace all occurrences of "con.log" with "console.log" (minus the quotes) and save the file
  5. Drag the edited/saved file back into the fresh backup zip to perform an UPDATE of that file with the edited version and exit/close the zip
  6. Go to the TamperMonkey "Utilities" tab, "Zip" section, "Import" and "Choose File". Select the above edited zip file.
  7. A new TM window opens showing you a restore will be performed and should ONLY LIST the "YouTube Center Developer Build.XXX" files
  8. Click IMPORT button at top of window - THIS FINALLY ALLOWS A PROPER OVERWRITE WITH LOCAL YOUR LOCAL EDIT via a "restore"
  9. Verify that the newly imported FIXED version is present and ENABLED in your script list
  10. Navigate to youtube.com and all should again be working

Additional Information - Future Updates

In all my tests with various builds for some reason (I believe the sheer size of YTC script) is causing TM to crash/close the local import to simply overwrite with a locally edited version (and unless you manually increment the version num, TM will just overwrite you edits soon, anyway). The only working workaround I found which I believe also provides confirmation of a bug in the TM code is that the "restore" code routine is running a modified routine that properly pulls it back in to overwrite the internet-based source - unlike other smaller scripts this is the ONLY method I found that works in my testing.

Also, using my method above will NOT have any negative impact whatsoever on future updates. In fact, you can clearly see the original URL source that YOU HAD ORIGINALLY INSTALLED FROM remains unchanged - we are simply performing a local edit and the very next incremented release at the original URL will simply overwrite these fixes (so you may want to set updates to manual and VERIFY that this issue is fully resolved before manually allowing any updates to this script for the time being). This is basically "tricking" TM that does not actually perform any actual code checking and until it sees a newer version number, has no idea the "restored" version does not match the online version with the same version number.

comedinha commented 7 years ago

Last update of tempermonkey fix console bug on console. http://tampermonkey.net/changelog.php?version=4.3.5447&ext=gcal&updated=true&old=4.3.5445