Some Changes
This commit is contained in:
parent
aa9dcf5adf
commit
b4fab3498b
@ -3,7 +3,7 @@
|
|||||||
"name": "Force High-Resolution DisneyNOW",
|
"name": "Force High-Resolution DisneyNOW",
|
||||||
"author": "TheBrokenRail",
|
"author": "TheBrokenRail",
|
||||||
"version": "1.2",
|
"version": "1.2",
|
||||||
"description": "This browser extension forces DisneyNOW to use their higher-resolution video stream by imitating the Android app. (It also blocks DisneyNOW ads.)",
|
"description": "This browser extension forces DisneyNOW to use their higher-resolution video stream by imitating the Android app. (It also blocks some DisneyNOW ads.)",
|
||||||
"homepage_url": "https://gitea.thebrokenrail.com/TheBrokenRail/force-high-resolution-disneynow",
|
"homepage_url": "https://gitea.thebrokenrail.com/TheBrokenRail/force-high-resolution-disneynow",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
10
src/page.js
10
src/page.js
@ -45,17 +45,19 @@ Object.defineProperty(XMLHttpRequest.prototype, 'setRequestHeader', {
|
|||||||
|
|
||||||
// Add resolution info to video player.
|
// Add resolution info to video player.
|
||||||
function addResolutionInfo(player) {
|
function addResolutionInfo(player) {
|
||||||
// Create (or find existing) <p> element.
|
// Remove existing <p> element (if possible).
|
||||||
const id = '__disneynow_resolution_info__';
|
const id = '__disneynow_resolution_info__';
|
||||||
let p = document.getElementById(id);
|
let p = document.getElementById(id);
|
||||||
if (!p) {
|
if (p) {
|
||||||
// Create
|
p.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create <p> element
|
||||||
p = document.createElement('P');
|
p = document.createElement('P');
|
||||||
p.id = id;
|
p.id = id;
|
||||||
|
|
||||||
// Add <p> element to DOM.
|
// Add <p> element to DOM.
|
||||||
player.parentElement.insertBefore(p, player);
|
player.parentElement.insertBefore(p, player);
|
||||||
}
|
|
||||||
|
|
||||||
// Set initial resolution text.
|
// Set initial resolution text.
|
||||||
function setResolutionText(resolution) {
|
function setResolutionText(resolution) {
|
||||||
|
Loading…
Reference in New Issue
Block a user