zekrom-vale / bright-youtube Goto Github PK
View Code? Open in Web Editor NEWAutomatically adjusts ANY HTML5 video's brightness
Home Page: https://www.youtube.com
Automatically adjusts ANY HTML5 video's brightness
Home Page: https://www.youtube.com
The folder is spelled incorrectly!
I will need to limit it to only code and basic functions.
// for future custom function support
function tick(ic){
var V= oldRgb*(1-ic) + rgb*ic;
var Sandbox= new Components.utils.Sandbox('sandbox.js');
Sandbox.V= V;
var dat= Components.utils.evalInSandbox(text, Sandbox, latest, 'sandbox.js');
setFilter(dat.bright, dat.invert, dat.con, dat.sat);
}
function formula(V){
return {'bright': bright, 'invert': invert, 'con': con, 'sat': sat};
}
This would require global permissions.
Detect the video tag.
All settings on install are undefined and brake the program until they have a value. (By toggling them)
tried this
const box= document.createElement('span'),
lbl= document.createElement('label'),
opt= document.createElement('input'),
slider= document.createElement('div'),
name= document.createElement('span');
box.class= 'box';
lbl.class= 'switch';
opt.type= "checkbox";
opt.id= 'Brt-opt';
slider.class= 'slider round';
name.class= 'name';
box.appendChild(lbl);
box.appendChild(name);
lbl.appendChild(opt);
lbl.appendChild(slider);
/* const opt= document.createElement('input');
opt.type= 'checkbox' */
opt.checked= items.Active;
opt.id= 'Brt-opt';
document.getElementById('menu-container').appendChild(box);
Menus that darken the background/ black it out will cause unintended results. But how could I fix it?
setFilter(1,0,1,1)
should empty style #Brt-YT
.
https://gaming.youtube.com/games
It is the same, just add to the manifest
.html5-main-video
.html5-video-player.playing-mode
This might involve rearranging the functions and adding new js files as I might need to have a diferent script run.
I have narrowed it down to function getAvColor(img)
and context.drawImage(img, 0, 0);
I even tried disabling hardware acceleration. Any info would help!
Sometimes the extension does not activate, possibly because the delay
is too low.
file:/// should be an option for Pro users, <all_urls>
excludes this.
I already have it down to a few objects.
htmlLang.txt
It just does not want to start on twitch.
This will allow users more options and improve security.
https://developer.chrome.com/extensions/permissions
body.enhancer-for-youtube-pinned-player._400x225 #movie_player:not(.ytp-fullscreen),
body.enhancer-for-youtube-pinned-player._400x225 #movie_player:not(.ytp-fullscreen) video.html5-main-video,
body.enhancer-for-youtube-wide-player.enhancer-for-youtube-pinned-player._400x225 #movie_player:not(.ytp-fullscreen) video.html5-main-video,
body.enhancer-for-youtube-pinned-player._400x225 #movie_player:not(.ytp-fullscreen) .ytp-iv-video-content,
body.enhancer-for-youtube-wide-player.enhancer-for-youtube-pinned-player._400x225 #movie_player:not(.ytp-fullscreen) .ytp-iv-video-content {
height: 225px !important;
width: 400px !important;
}
function onPause(){
clearInterval(clock);//Sometimes fails
toggle(false);
}
clock is global
I have redundant clearInterval, and I have no idea why it fails!
Ex black bars and onscreen text.
Delay>= 500s
It may be more appropriate to inspect all pixels. Also copying the video to the canvas may create descrepencys.
It will disable if storage does not have defaults how do I add them?
Is there a way to get the average color without canvas? Because canvas is slow and resorse intensive.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.