Changed background image a bit, disabled 'settings' option in player popup, disabled debugging messages.
This commit is contained in:
parent
5fa15a7fca
commit
069a8a6f83
16
README.md
16
README.md
@ -62,16 +62,18 @@ More or less everything. Works regardless of whether the video is in fullscreen
|
||||
|
||||
## What doesn't
|
||||
|
||||
On a very rare occasion, `w` button won't work. So far this behaviour was seen in [two](https://www.youtube.com/watch?v=eRsGyueVLvQ) [videos](https://www.youtube.com/watch?v=RYsPEl-xOv0) out of countless I've tried. In cases like this, use `z` to zoom instead.
|
||||
|
||||
Keybind `a` just doesn't work at all, so no 16:10.
|
||||
At the moment, I'm not aware of anything that this extension advertises not working.
|
||||
|
||||
## Plans for the future
|
||||
|
||||
* Adding custom keybinds
|
||||
* Adding a proper settings page
|
||||
* ~~Adding custom keybinds~~ (done at lastest)
|
||||
* ~~Adding a proper settings page~~ (done at last)
|
||||
* ~~Adding buttons for actions in youtube's player~~ (kinda done)
|
||||
* ~~Adding an option to force specific aspect ratio~~ (now it's "good enough")
|
||||
* Port to Chrome
|
||||
* Have extension remember the last setting when switching between fullscreen and not fullscreen. Have an option to remember last selected aspect ratio.
|
||||
* Netflix support
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -118,3 +120,7 @@ Keybind `a` just doesn't work at all, so no 16:10.
|
||||
###v1.0-rc1
|
||||
|
||||
* Settings page is added and mostly working.
|
||||
|
||||
###v1.0.0
|
||||
|
||||
* Is pretty much rc1, except slightly different background image.
|
||||
|
39
js/uw.js
39
js/uw.js
@ -1,4 +1,4 @@
|
||||
var debugmsg = true;
|
||||
var debugmsg = false;
|
||||
if(debugmsg){
|
||||
console.log(". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ");
|
||||
console.log("\nLoading ultrawidify (uw)\nIf you can see this, extension at least tried to load\n\nRandom number: ",Math.floor(Math.random() * 20) + 1,"\n");
|
||||
@ -152,13 +152,16 @@ $(document).ready(function() {
|
||||
console.log("We're writing a comment or something. Doing nothing");
|
||||
return;
|
||||
}
|
||||
console.log(KEYBINDS);
|
||||
console.log("we pressed a key: ", event.key , " | keydown: ", event.keydown);
|
||||
|
||||
if(debugmsg){
|
||||
console.log(KEYBINDS);
|
||||
console.log("we pressed a key: ", event.key , " | keydown: ", event.keydown);
|
||||
}
|
||||
for(i in KEYBINDS){
|
||||
console.log("i: ", i, "keybinds[i]:", KEYBINDS[i]);
|
||||
if(debugmsg)
|
||||
console.log("i: ", i, "keybinds[i]:", KEYBINDS[i]);
|
||||
if(event.key == KEYBINDS[i].key){
|
||||
console.log("Key matches!");
|
||||
if(debugmsg)
|
||||
console.log("Key matches!");
|
||||
//Tipka se ujema. Preverimo še modifierje:
|
||||
//Key matches. Let's check if modifiers match, too:
|
||||
var mods = true;
|
||||
@ -170,7 +173,8 @@ $(document).ready(function() {
|
||||
else if(KEYBINDS[i].modifiers[j] == "shift")
|
||||
mods &= event.shiftKey ;
|
||||
}
|
||||
console.log("we pressed a key: ", event.key , " | mods match?", mods, "keybinding: ", KEYBINDS[i]);
|
||||
if(debugmsg)
|
||||
console.log("we pressed a key: ", event.key , " | mods match?", mods, "keybinding: ", KEYBINDS[i]);
|
||||
if(mods){
|
||||
if(KEYBINDS[i].action == "char"){
|
||||
changeCSS("char", KEYBINDS[i].targetAR);
|
||||
@ -197,9 +201,9 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
//UI helpers
|
||||
function saveKeybinds(){
|
||||
console.log($('uw_kbshortcuts_form').serializeArray());
|
||||
}
|
||||
// function saveKeybinds(){
|
||||
// console.log($('uw_kbshortcuts_form').serializeArray());
|
||||
// }
|
||||
|
||||
|
||||
//BEGIN UI
|
||||
@ -312,7 +316,11 @@ function addCtlButtons(provider_id){
|
||||
|
||||
//Če rabimo skriti gumb za nastavitve, potem mora biti i=1
|
||||
//If we need to hide settings button, then we should make i=1
|
||||
for(var i = 0; i < smenu_el.length; i++){
|
||||
|
||||
//FIXME: knof za nastavitve ne radi (nastavitve se ne odprejo)
|
||||
//FIXME: 'settings' button on the player doesn't work
|
||||
|
||||
for(var i = 1; i < smenu_el.length; i++){
|
||||
settings_menu.appendChild(smenu_el[i]);
|
||||
smenu_el[i].className += "uw-setmenu-item";
|
||||
}
|
||||
@ -423,7 +431,8 @@ function addCtlButtons(provider_id){
|
||||
smenu_ar_options[2].onclick = function(event) {event.stopPropagation(); changeCSS("char", (16/9 )); };
|
||||
smenu_ar_options[3].onclick = function(event) {event.stopPropagation(); changeCSS("char", (21/9 )); };
|
||||
|
||||
smenu_el[0].onclick = function (event) {event.stopPropagation(); showSettings() };
|
||||
|
||||
// smenu_el[0].onclick = function (event) {event.stopPropagation(); showSettings() };
|
||||
|
||||
smenu_el[5].onclick = function (event) {event.stopPropagation(); changeCSS("fit" ,"fitw" ) };
|
||||
smenu_el[4].onclick = function (event) {event.stopPropagation(); changeCSS("fit" ,"fith" ) };
|
||||
@ -456,9 +465,6 @@ function onError(err){
|
||||
function showSettings(){
|
||||
var prettypls = browser.runtime.openOptionsPage();
|
||||
prettypls.then(onOpen, onError);
|
||||
|
||||
console.log(prettypls);
|
||||
|
||||
}
|
||||
|
||||
// Ta funkcija se proži, ko vstopimo ali izstopimo iz celozaslonskega načina
|
||||
@ -612,9 +618,10 @@ function set_video_ar(aspect_ratio, video, player){
|
||||
var video_ar = video.width / video.height;
|
||||
var display_ar = player.width / player.height;
|
||||
|
||||
if(debugmsg)
|
||||
if(debugmsg){
|
||||
console.log("uw::set_video_ar | aspect ratio: " + aspect_ratio + "; video_ar: " + video_ar + "; display_ar: " + display_ar);
|
||||
console.log("uw::set_video_ar | player dimensions: " + player.width + "x" + player.height + "; video dimensions: " + video.width + "x" + video.height);
|
||||
}
|
||||
|
||||
if( aspect_ratio*1.1 > video_ar && video_ar > aspect_ratio*0.9 ){
|
||||
// Ta hack nas reši problema, ki ga predstavlja spodnji if stavek — če se legit 21:9 videu na 16:9 monitorju
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
"manifest_version": 2,
|
||||
"name": "Ultrawidify-git",
|
||||
"version": "1.0rc1",
|
||||
"version": "1.0.0",
|
||||
|
||||
"icons": {
|
||||
"32":"res/icons/uw-32.png",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 759 KiB After Width: | Height: | Size: 783 KiB |
@ -18,6 +18,7 @@
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
text-align: center;
|
||||
z-index: -1000;
|
||||
}
|
||||
|
||||
a, a:visited{
|
||||
@ -72,6 +73,7 @@
|
||||
margin-bottom: 1.5em;
|
||||
padding-top: 0.3em;
|
||||
padding-bottom: 0.4em;
|
||||
z-index: -200;
|
||||
}
|
||||
.tab{
|
||||
color: #fa6607;
|
||||
@ -249,7 +251,7 @@
|
||||
<p>This extension uses font <a href="https://fonts.google.com/specimen/Oxygen">Oxygen</a>.</p>
|
||||
<p>Special thanks to CD Project Red (The Witcher 2), Anet (Guild Wars 2), and Valve (CS:GO), which made it possible for me to untrigger myself after seeing so many improperly encoded videos.</p>
|
||||
<small><p>More or less.</p>
|
||||
<p>GW2 is also roughly how the avatar was obtained. Noone tell Anet, though.</p></small>
|
||||
<!-- <p>GW2 is also roughly how the avatar was obtained. Noone tell Anet, though.</p> --></small>
|
||||
<p>Special one-finger salute to all incompetent people who don't know how to properly encode videos and upload them to youtube (to word it most nicely).</p>
|
||||
<p>Special thanks to me for making this extension. You're welcome.</p>
|
||||
</div>
|
||||
|
BIN
ultrawidify.zip
BIN
ultrawidify.zip
Binary file not shown.
Loading…
Reference in New Issue
Block a user