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

How To Install on Firefox 57? #2458

Open maiofalmo opened 7 years ago

maiofalmo commented 7 years ago

Hi Everyone,

I've just been upgraded to Firefox 57 which stopped the addon retaining its settings. I've done a clean install and can't find a way to install.

YouTubeCenter.xpi

Userscript

Any suggestions?

bhrgunatha commented 7 years ago

If you disable the new polymer layout at youtube you can install the developer build user script in violent monkey and youtubecenter continues to work - not 100% but well enough for my settings.

I made my own script to disable polymer - if you add a new script to violent monkey and the code below things seem to work out OK.

Youtbue will eventually stop supporting the disable_polymer querystring parameter but it WORKS ON MY MACHINE™

// ==UserScript==
// @name        Disable polymer layout
// @namespace   fuglyoutube
// @description Disable polymer layout
// @match        *://*.youtube.com/*
// @version     1
// @grant       none
// @run-at      document-start
// ==/UserScript==
try {
  var url = document.location.toString();
  var updateUrl = updateQueryStringParameter(url, 'disable_polymer=true');
  if (url != updateUrl) {
    document.location = updateUrl;
  }
} catch (e) {}

function updateQueryStringParameter(uri, en_slug) {
  var re = new RegExp('([?&])' + en_slug, 'i');
  if (uri.indexOf(en_slug) >= 0) {
    return uri;
  } else {
    var re2 = new RegExp('([?&])');
    if (uri.match(re2)) {
      return uri.replace(re2, '$1' + en_slug + "&");
    } else {
      if (uri.indexOf('#!') < 0) {
        return uri + "?" + en_slug;
      } else {
        return uri.replace('#!', "?" + en_slug + '#!');
      }
Bluscream commented 6 years ago

Duplicate of #2454