Commit Graph

278 Commits

Author SHA1 Message Date
547ef7ad7b Stretcher.js instanced, can calculate aspect ratio factors from aspect ratios alone 2018-05-24 22:49:32 +02:00
7d89f41e40 Moved keybinds options to ExtensionConf. Rewrote Keybinds in a bit more OOP way 2018-05-24 20:50:37 +02:00
0f8f842ec6 Forgot to save VideoData.js 2018-05-23 23:58:34 +02:00
8f201e1ee0 PageInfo can start and stop all periodic functions (to be implemented when switching tabs) 2018-05-23 23:57:51 +02:00
8d7cefd420 Scaler.js - calculateCrop() and modeToAr() no longer take 'video' and 'playerDimensions' as arguments, instead reading those properties from videoData 2018-05-23 00:34:18 +02:00
a7aef8856d PlayerData object gets destroyed when videoData does. Scaler now takes video from videoData instead of function arguments 2018-05-22 00:19:50 +02:00
69d665f6fd PageInfo: rescan doesn't compare found <video> elements to elements in destroyed VideoData objects, fixing the issue where autodetection broke upon visiting youtube's search page 2018-05-21 22:43:56 +02:00
42cf4d91e7 Fixed the problem where 'this' in ghettoWatcher() was 'window' instead of current object. 2018-05-20 23:31:05 +02:00
ad1436289b Fixed some problems with recursion in autodetection startup. Fixed problems with autodetection sometimes not starting. 2018-05-20 23:17:09 +02:00
009a440ce8 but really, now 2018-05-19 22:21:28 +02:00
c53780e619 If video doesn't have width or height, we do nothing. 2018-05-19 22:20:35 +02:00
08b10220e1 Scaler no longer static 2018-05-18 23:26:20 +02:00
c442f9e01c Fixed autodetection crash on drm-protected sites 2018-05-17 23:09:04 +02:00
4fe5ce6bcb Autodetection persists over multiple videos 2018-05-16 23:26:47 +02:00
82abee42bd autodetection works more or less properly. Removed some console.logs 2018-05-16 20:59:39 +02:00
4914a0dc1c video is now centered correctly 2018-05-16 20:42:00 +02:00
d38dee1a8a Autodetection gets detected and applied, but css is still off 2018-05-16 20:26:55 +02:00
17f330f242 Automatic aspect ratio detection runs, but applied css is garbage and everything crashes after first aspect ratio change. 2018-05-15 21:40:53 +02:00
dba655b7d3 EdgeDetect: findCandidates() and edgeDetect() work (according to DebugCanvas) 2018-05-15 20:36:22 +02:00
a106d0f468 Fixed syntax errors and errors with inexisting or improperly declared variables. Didn't fix things that make stuff not work tho 2018-05-14 20:39:15 +02:00
3686341677 rewrite finished to the point where extension doesn't outright crash. Nothing works, though. 2018-05-13 21:05:11 +02:00
0ac051d5d5 Resizer prepared to handle stretching and zooming 2018-05-13 15:22:28 +02:00
cbe250fabf All thigns related to player element have been moved to PlayerData (or at least most of them). 2018-05-13 13:49:25 +02:00
4e2ac9c647 Implemented zoom 2018-05-12 02:51:58 +02:00
4519d8854a EdgeDetect is now in edgeDetect 2018-05-12 01:51:43 +02:00
acc0455415 EdgeDetection partially moved to its own file 2018-05-11 00:49:50 +02:00
3bc356636e Fixed some silly mistakes 2018-05-10 22:35:38 +02:00
4ed361ca65 DebugCanvas converted to proper object. ArDetect not fixed yet 2018-05-10 22:22:58 +02:00
af0ad4c080 GuardLine (blackbar and image tests) moved to their own file) 2018-05-10 21:39:24 +02:00
Tamius Han
d39a070117 Some progress on frameCheck() (formerly _ard_draw_but_for_realz) 2018-05-09 00:58:50 +02:00
Tamius Han
a40f32908b ArDetect.js: processAr rewritten in ArDetector object 2018-05-09 00:34:22 +02:00
Tamius Han
2f6710586f ArDetect.start() was objectified 2018-05-09 00:03:22 +02:00
Tamius Han
36878921fb Starting to turn ArDetect into a proper class as well 2018-05-08 23:35:16 +02:00
Tamius Han
c7b6035c55 conditional stretching 2018-05-07 21:58:11 +02:00
Tamius Han
390348202e Moved functions that calculate video crop from Resizer.js to Scaler.js. Resizer.js is not fixed to account for this yet. 2018-05-06 21:32:18 +02:00
Tamius Han
befd331687 minor fixes 2018-05-05 23:19:42 +02:00
Tamius Han
c35a8c5f59 Added a safety thingy that disables autodetection if autodetection consistenly causes lag. 2018-05-05 23:06:39 +02:00
Tamius Han
081f8e968f added auto-disable if autodetection takes too long 2018-05-04 00:27:40 +02:00
Tamius Han
cdd533e093 think this should be good for release 2018-05-02 17:52:25 +02:00
Tamius Han
9a5f586eaf Fixes to aspect ratio detection: guardline/black line now works properly-ish. By accident also managed to correct the bug where aspect ratio detection was mildly screwed in theater mode? 2018-05-01 23:09:58 +02:00
Tamius Han
bf7dce2482 Forgot git commit -a doesn't actually add new files. again. 2018-04-26 00:40:23 +02:00
Tamius Han
9e044ac66f added a debug canvas for ArDetect to draw on in debug mode 2018-04-26 00:40:09 +02:00
Tamius Han
b0ef12d97b Trying to fix the youtube popup bug by re-detecting player element every time a new <video> tag is detected. 2018-04-25 20:39:52 +02:00
Tamius Han
eebed0e1c4 turned on logging in debug.js 2018-04-22 17:10:36 +02:00
Tamius Han
956675b0c9 extra changes to logs 2018-04-22 16:51:35 +02:00
Tamius Han
7527f73922 some more testing stuff for testers 2018-04-22 15:12:27 +02:00
Tamius Han
596ca021ba some more testing stuff for testers 2018-04-22 15:11:48 +02:00
Tamius Han
64e28e8074 Another attempt at fixing the youtube search popup. 2018-04-22 14:35:40 +02:00
Tamius Han
77e1f711fd enabled logging for player dimensions 2018-04-11 19:59:00 +02:00
Tamius Han
59d741b8a5 Tried implementing some checks that would prevent aspect ratio from changing if our edge candidate is text on black background. 2018-04-11 00:19:44 +02:00
Tamius Han
3740f2c487 ??? 2018-04-10 21:35:34 +02:00
Tamius Han
6fe906f166 Did I mention Warcraft movie needs a sequel? Because Warcraft movie needs a sequel.
So netflix aspect ratio detection was fine when watching Altered Carbon (2:1), but Warcraft (21:9) had some huge issues with properly auto-detecting aspect ratio (especially when starting automatic aspect ratio after manual toggle). Fixed that (i think).
2018-03-18 17:35:51 +01:00
Tamius Han
44828b3ecf Tried to fix aspect ratio autodetection on netflix but ended up watching the entire Altered Carbon instead.
Just kidding, I also fixed the autodetection on netflix. And the bit where key for netflix in SitesConf.js was wrong.
2018-03-18 15:14:57 +01:00
Tamius Han
61a3b07c6b Fixed some issues with detecting player size changes (esp. on youtube), where switching from normal player to full screen player wouldn't be handled correctly. 2018-03-14 23:51:13 +01:00
Tamius Han
c35774c36f Chrome kinda works according to 1 beta tester. Fixed few other chrome-specific bugs I've noticed. Fixed the font inclusion (hopefully) 2018-03-14 21:19:15 +01:00
Tamius Han
3b7f00dc8e I feel fancy.
Fixed #25
Fixed #32
Fixed #30 (I actually haven't, just the extension was set to 'you have to manually allow sites other than youtube and netflix')
Fixed #27
2018-03-14 00:08:51 +01:00
Tamius Han
e6efaf52d8 Split settings between Settings.js (handles loading and saving) and ExtensionConf.js (actual configuration). All settings are now handled in background script (content scripts get ExtensionConf from background script). Saving seems to work. 2018-03-13 23:55:38 +01:00
Tamius Han
51f2df930d end of the day commit. settings for autoAr ARE NOT getting saved. 2018-03-13 00:36:10 +01:00
Tamius Han
13a928b90e ar fixed, disabling/enabling sites roughly works. 2018-03-11 18:00:47 +01:00
Tamius Han
d079a84005 Sitesconf comeback complete. Need to implement adding and changing settings for sites in the popup and the background script. 2018-03-11 00:49:29 +01:00
Tamius Han
15aeefbd8c retiring whitelist/blacklist arrays in Settings, SitesConf is making a comeback instead 2018-03-10 23:25:30 +01:00
Tamius Han
a5422abfcd Fixed the issue where fullscreen videos wouldn't be entirely fullscreen on youtube. 2018-03-10 12:30:38 +01:00
Tamius Han
7db22fb466 RAM leak issue should be fixed for the most part. We did it ~~reddit~~github! (NOTE: there's still other things that need fixing before I let this into prod) 2018-03-08 22:22:42 +01:00
Tamius Han
93d3b064da end of the day commit. multiple concurrent instances seems to be at least somewhat under control, but other parts of extension still need modifications and testing. 2018-03-07 23:49:43 +01:00
Tamius Han
ba841c6ea3 unfuck progress before switching branches. 2018-03-07 21:42:40 +01:00
Tamius Han
18f1ea26a7 The memory usage situation improved but still far from ideal, both in terms of memory usage as well as polling frequency and video resolution we settled for. 2018-03-05 23:55:14 +01:00
Tamius Han
b9b9626cbd forgot to revert something 2018-03-04 23:07:46 +01:00
Tamius Han
4f37fe059f tried and failed some more at getting solution to garbage garbage collector 2018-03-04 23:07:11 +01:00
Tamius Han
6c9f3c537c The more I try to fix ArDetect, the more broken it is :/ 2018-03-03 23:58:29 +01:00
Tamius Han
b4d5749988 #25 appears to be fixed, but needs more testing. 2018-02-28 23:54:32 +01:00
Tamius Han
3bd28842e1 Tried my hand at fixing memory leak. ArDetect — no dice. Ghetto watcher for changes in player size now saves the HTML element that's deemed to be the player frame and uses said node for size tests in subsequent iterations (as opposed to searching for player node on every frame). Also hopefully fixed the bug with custom settings for individual sites not
getting saved.
2018-02-26 22:38:17 +01:00
Tamius Han
a33c3656ad Merge branch 'stable-ytfix' 2018-02-25 21:41:44 +01:00
Tamius Han
724c856f0c Disabled imgur. 2018-02-25 21:38:42 +01:00
Tamius Han
6edcd4f0fb fix for #22 — reddit should be blacklisted by default now 2018-02-22 22:20:15 +01:00
Tamius Han
728fa0a0b3 fixed #24 and prolly #23 2018-02-22 22:14:52 +01:00
Tamius Han
3896bff39b fix for youtube screwy that happened this week 2018-02-22 22:10:13 +01:00
Tamius Han
aa30ebaa88 committing some stuff before hotfixing #24 2018-02-22 21:06:57 +01:00
Tamius Han
28014f5ff1 Of course ArDetect was bugged. Fixed most of those bugs. 2018-02-16 00:19:08 +01:00
Tamius Han
8c59faa25c New ArDetect almost finished. Not tested and no console.logs yet tho. 2018-02-15 22:59:31 +01:00
Tamius Han
90b1d8935c Started rewrite of autodetection. 2018-02-15 00:17:58 +01:00
Tamius Han
4daa054169 Fixed a series of small bugs with autodetection. 2018-02-12 23:28:31 +01:00
Tamius Han
f284c8b48a enabled logging 2018-02-06 19:51:31 +01:00
Tamius Han
1ceca7c293 Debug mode off, updated readme, manifest.json is now written for Chrome 2018-02-06 00:48:13 +01:00
Tamius Han
d78fa346ce register-video in ghettoOnChange didn't always work. background script now polls content script of current tab every 5 or so seconds. Popup script polls for has-video changes once every two seconds or so. 5s and 2s seem reasonable. 2018-02-06 00:36:48 +01:00
Tamius Han
fc4f073e5d fix for #20 2018-02-05 22:46:38 +01:00
Tamius Han
2c0f0ed607 Release v2.1.0 (sans readme) 2018-02-04 17:39:26 +01:00
Tamius Han
b13eff44e3 Reworked popup warnings. Chrome doesn't work again. 2018-02-02 00:21:29 +01:00
Tamius Han
174c987690 Keyboard shortcuts get loaded in popup, fixed 'reset' button in popup. 2018-02-01 00:26:16 +01:00
Tamius Han
7e848332ce Fixed keyboard not working in Firefox/twitch. 2018-01-30 23:36:03 +01:00
Tamius Han
3cccaa37ae Minor fixes, updated readme with beggathon. 2018-01-28 02:35:05 +01:00
Tamius Han
97b7adc55a Fixed autodetection and preserving aspect ratio changes across fullscreen switch. 2018-01-27 22:25:25 +01:00
Tamius Han
0c1cae3215 "Fit to width" and "fit to height" now calculate video fit according to player size, not screen size. 2018-01-27 20:27:11 +01:00
Tamius Han
463dcc0692 Fixed popup for Chrome — or so it seems. 2018-01-27 20:13:23 +01:00
Tamius Han
e51faaf934 New comms between [uw.js <==> uw-bg.js <==> popup.js] established. Working in Firefox, not in Chrome — potentially due to Promise.all() (try replacing with for(promise of promises) await promise) 2018-01-26 00:09:08 +01:00
Tamius Han
48dd676977 fixed command 2018-01-24 23:26:09 +01:00
Tamius Han
551bee1724 reintroducing background script, which will keep track of frames and videos in currently opened tab (not yet implemented) 2018-01-24 23:15:54 +01:00
Tamius Han
85a6a680b9 Optimizations and changes. 2018-01-20 22:59:31 +01:00
Tamius Han
3b3430ddce Merged FullScreenDetect into PlayerDetect. Youtube: switching between theater mode, full screen and normal mode works properly. Vimeo still broken. 2018-01-18 22:34:42 +01:00
Tamius Han
9265a336bc Trying to add blanket support for theater mode. Changing aspect ratio works in youtube theater mode, but only when manually launched. Chaning to full screen mode stops it. This commit breaks vimeo support. 2018-01-18 00:11:03 +01:00
Tamius Han
18b8e77e05 Merge branch 'master' of github.com:xternal7/ultrawidify 2018-01-17 20:58:12 +01:00
Tamius Han
ee626fd5dd Extra videos, BrowserDetect is getting set up for Edge 2018-01-17 20:57:24 +01:00
unknown
7175db885e Updated README.md 2018-01-12 23:31:03 +01:00
unknown
4829d45b09 Fixed netflix misalignment in FF 57+ 2018-01-12 22:53:07 +01:00
Tamius Han
d4a6901d7d Popup now works on Chrome as well. 2018-01-11 22:43:25 +01:00
Tamius Han
33acbe5015 Okay then. Turns out background script might not be necessary. (Even though not yet removed from the projects, popup now communicates directly with the tab as opposed to background page which forwards everything to the tab. I think. But this means even Chrome — as shit as it is — might be able to do the popup stuff without me having to maintain another
version of code that does the same thing.)
2018-01-10 23:16:07 +01:00
Tamius Han
45c986d66d Chrome is fucking cancer and its sendMessage() (both in chrome.tabs as well as chrome.runtime) sucks major ass. 2018-01-08 22:48:45 +01:00
Tamius Han
4b61325c58 Attempt at fixing Chrome's UI. Not successful because Chrome documentation is TL;DR 2018-01-06 22:58:31 +01:00
Tamius Han
d8ee278491 Fixed bug with popup buttons for forcing aspect ratio not always working. Autodetection can no longer get triggered by small changes in aspect ratio (but will get triggered if change is a small amount over the treshold still) 2018-01-02 03:36:29 +01:00
Tamius Han
5ad7144e67 Version 2.0! Woohoooo! 2017-12-31 18:28:03 +01:00
Tamius Han
ec6dfadb41 Some basic settings for keyboard shortcuts. 2017-12-30 20:53:15 +01:00
Tamius Han
d0373820fe Popup is working properly now. 2017-12-30 18:36:08 +01:00
Tamius Han
82dd71eb5b Keyboard settings work (modifiers untested) 2017-12-30 12:55:58 +01:00
Tamius Han
0f2d786780 Popup menus are showing properly. 2017-12-30 02:58:24 +01:00
Tamius Han
de2677fdd6 Added ui/popup window (and it kinda works) 2017-12-29 23:34:40 +01:00
Tamius Han
c9719a163a Fixed some problems. 2017-12-17 22:56:07 +01:00
Tamius Han
66cc44ab6d Reshaped popup 2017-12-02 21:09:08 +01:00
Tamius Han
0083e8203d Fixed the issue with styles not getting applied. 2017-11-13 22:35:04 +01:00
Tamius Han
602c5f3418 We have semi-working version. Keybinds aren't rebindable yet. Settings page needs to be remade to accomodate new options. 2017-10-17 22:17:51 +02:00
Tamius Han
f582cbe42d started with keybinds 2017-10-02 23:30:40 +02:00
Tamius Han
021f5c6580 Vimeo has a non-fs autodetect. 2017-10-02 00:27:01 +02:00
Tamius Han
9b4b6c2ceb Improved autodetection a little (detecting aspect ratio is possible even if the letterbox is interrupted by dark shapes) 2017-09-27 02:26:47 +02:00
Tamius Han
ed1ac6da36 Autodetection works. Somewhat globally, even (tested youtube and vimeo) 2017-09-24 01:54:46 +02:00
Tamius Han
9d3e16dc58 form for editing site options was turned into a textarea. todo: proper saving 2017-05-23 21:00:38 +02:00
Tamius Han
62d40e25f5 Started breaking extension in multiple smaller files. 2017-04-27 20:03:36 +02:00
Tamius Han
09ef70e96f Some minor fixes. 2017-04-18 20:48:29 +02:00
Tamius Han
c20bac3b5f More refactoring. Submenus still don't work for some reason. 2017-03-23 13:20:59 +01:00
Tamius Han
0d943df844 Fixed up iframe detection. Noticed that 'force aspect ratio' menu doesn't work. 2017-03-21 21:23:03 +01:00
Tamius Han
505995f83f Site configs are hidden by default. Wrote functions for gathering/setting the values from the edit form of a given site. 2017-03-14 23:51:03 +01:00
Tamius Han
f5d3711b4c Settings/sites: 'edit' button now actually enables the form. 2017-03-13 20:34:59 +01:00
Tamius Han
486ca08e89 Started adding options to configure websites from settings. 2017-03-02 20:06:53 +01:00
Tamius Han
e36689e708 Unhardcoded the classes, which are used to determine the sample button, player, and place where UI gets anchored. We can now add the ability for user to add rules for custom pages. 2017-02-28 20:02:20 +01:00
Tamius Han
d22dd18a9d Extension UI can now be hidden. 2017-02-22 13:53:40 +01:00
Tamius Han
89f9b82b4b UI rewrite complete. TODO: test on netflix, enable UI customization by user. 2017-02-20 23:40:47 +01:00
Tamius Han
10f0c6c92d dynamically setting position of a submenu 2017-02-18 20:19:24 +01:00
Tamius Han
dcac96dcd1 Getting bounding rectangles of parent menu, submenu and player 2017-02-16 23:59:11 +01:00
Tamius Han
7bf2c65315 Fixed menu (submenus still somewhat broken) 2017-02-15 20:34:47 +01:00
Tamius Han
dfa51ab925 Refactoring/rewriting UI generating functions 2017-02-13 23:04:21 +01:00
Tamius Han
e7fbf6231d 'more settings' menu now shows on youtube, but offset isn't calculated properly in fullscreen 2017-01-23 21:18:01 +01:00
Tamius Han
69c01e83ed Updated README, disabled debugging. 2017-01-22 01:15:03 +01:00
Tamius Han
4a331e0010 It took some persuading to make it work both in Chrome and Firefox at the same time. Fuck Chrome. 2017-01-21 22:53:12 +01:00
Tamius Han
ebbd575d67 Automatic aspect ratio seems to be sufficiently polished on firefox. TODO: testing in Chrome. 2017-01-21 21:09:36 +01:00
Tamius Han
f64bc325f3 Chrome support. 2017-01-21 18:31:47 +01:00
Tamius Han
16e855e4ac Netflix autoAR: polished, working and in settings. Ready to submit to AMO. 2017-01-19 21:29:54 +01:00
Tamius Han
39d8139e0c It appears that auto-aspect-ratio thingy on Netflix approximately works. 2017-01-17 22:35:04 +01:00
Tamius Han
f64993a0d1 For a brief moment, I got this extension to autoremove unnecessary black bars. Progress! 2017-01-17 00:15:03 +01:00
Tamius Han
90fdfe1a2c Updated README 2017-01-16 00:13:11 +01:00
Tamius Han
7727a8886d Tried (and failed) to get 'settings' menu to work on netflix 2017-01-15 23:36:47 +01:00
Tamius Han
080dbc303c 'Settings' menu now works on youtube (but _still_ not on netflix) 2017-01-15 18:56:36 +01:00
Tamius Han
43cded9f31 Fixed video resetting after zoom 2017-01-14 15:48:46 +01:00
Tamius Han
39a1dbad40 Fixed the issue where zooming in would go forever. 2017-01-14 15:17:26 +01:00