Ultrawidify 的评价
Ultrawidify 作者: Tamius Han
Tamius Han 的回应
开发者回应
发布于 8 年前That's not normal behaviour, obviously. Good news is, I've been able to reproduce it and good lord, that is a nifty little oversight. Fix coming soon-ish.
1. You don't have to disable/enable extension in firefox. If extension doesn't work, reloading page (F5) does the job just fine.
1.b Open the video in a new tab.
That's the workaround for the time being. I'll try to have a fix out this weekend, failing that by Christmas.
If that doesn't work, please file an issue here: https://github.com/xternal7/ultrawidify/issues
Things I want to know: exact steps to replicate, other extensions you have, operating system you use.
----------
Why do you have this issue (I'll try to spice it up a bit to keep it simple and interesting):
When you open youtube in a new tab, the extension tries to run. All the extension does on startup is say "hey, when the page loads, tell the page how to handle keys and add those buttons to the player bar."
Of course, we need to find where the player bar is. We also need to set the size of our buttons and menus ourselves, and the easiest way to do so is to find a button that already exists. So we say: "Hey mr. browser, would you kindly give me all the elements that call themselves a youtube player button?" And browser does what its told to do, and gives you a basket full of buttons. But you don't care about the basket full of buttons, you want to know how wide and tall a button is, and since (in general) all buttons are the same size, you say: "Hey mr browser can you please take the first item out of that basket and tell me how wide that item is?" And, keep in mind that this happens right after the page has finished loading.
Now, if you open a youtube video in a new tab, this shouldn't be a problem. There's a video on the page, so browser finds a whole basket worth of buttons, and all is well. The problem appears when you're on youtube, but the page lacks a video player (and therefore the youtube player buttons as well) — for example, the search page. In this case, when you tell the browser to fill a basket with all elements that call themselves a youtube player button, it happily does so. It gives you an empty basket and a strange look. When you ask the browser to take the first element out of that basket and tell you its width, the browser smacks you across the face and says "lol wtf? gtfo" because that's a very absurd thing to ask. At this point, the extension is crashed (until the next page load) and won't do a thing (until the next reload).
.
TL;DR:
Extension: "Give me a basket with buttons"
Browser: "Okay, here's the basket. But it's empty — there isn't any buttons."
Extension: "Tell me the width of the first button."
Browser: "Go to the naughty corner and think about what you've done."
1. You don't have to disable/enable extension in firefox. If extension doesn't work, reloading page (F5) does the job just fine.
1.b Open the video in a new tab.
That's the workaround for the time being. I'll try to have a fix out this weekend, failing that by Christmas.
If that doesn't work, please file an issue here: https://github.com/xternal7/ultrawidify/issues
Things I want to know: exact steps to replicate, other extensions you have, operating system you use.
----------
Why do you have this issue (I'll try to spice it up a bit to keep it simple and interesting):
When you open youtube in a new tab, the extension tries to run. All the extension does on startup is say "hey, when the page loads, tell the page how to handle keys and add those buttons to the player bar."
Of course, we need to find where the player bar is. We also need to set the size of our buttons and menus ourselves, and the easiest way to do so is to find a button that already exists. So we say: "Hey mr. browser, would you kindly give me all the elements that call themselves a youtube player button?" And browser does what its told to do, and gives you a basket full of buttons. But you don't care about the basket full of buttons, you want to know how wide and tall a button is, and since (in general) all buttons are the same size, you say: "Hey mr browser can you please take the first item out of that basket and tell me how wide that item is?" And, keep in mind that this happens right after the page has finished loading.
Now, if you open a youtube video in a new tab, this shouldn't be a problem. There's a video on the page, so browser finds a whole basket worth of buttons, and all is well. The problem appears when you're on youtube, but the page lacks a video player (and therefore the youtube player buttons as well) — for example, the search page. In this case, when you tell the browser to fill a basket with all elements that call themselves a youtube player button, it happily does so. It gives you an empty basket and a strange look. When you ask the browser to take the first element out of that basket and tell you its width, the browser smacks you across the face and says "lol wtf? gtfo" because that's a very absurd thing to ask. At this point, the extension is crashed (until the next page load) and won't do a thing (until the next reload).
.
TL;DR:
Extension: "Give me a basket with buttons"
Browser: "Okay, here's the basket. But it's empty — there isn't any buttons."
Extension: "Tell me the width of the first button."
Browser: "Go to the naughty corner and think about what you've done."