Merge branch 'master' of github.com:xternal7/ultrawidify
This commit is contained in:
commit
128e311bb5
@ -1,10 +1,10 @@
|
|||||||
// Set prod to true when releasing
|
// Set prod to true when releasing
|
||||||
_prod = true;
|
//_prod = true;
|
||||||
// _prod = false;
|
_prod = false;
|
||||||
|
|
||||||
Debug = {
|
Debug = {
|
||||||
init: true,
|
init: true,
|
||||||
debug: false,
|
debug: true,
|
||||||
keyboard: true,
|
keyboard: true,
|
||||||
debugResizer: true,
|
debugResizer: true,
|
||||||
debugArDetect: true,
|
debugArDetect: true,
|
||||||
|
@ -24,7 +24,9 @@ class CommsClient {
|
|||||||
destroy() {
|
destroy() {
|
||||||
this.pageInfo = null;
|
this.pageInfo = null;
|
||||||
this.settings = null;
|
this.settings = null;
|
||||||
this.port.onMessage.removeListener(this._listener);
|
if (!BrowserDetect.edge) { // edge is a very special browser made by outright morons.
|
||||||
|
this.port.onMessage.removeListener(this._listener);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setPageInfo(pageInfo){
|
setPageInfo(pageInfo){
|
||||||
@ -37,7 +39,9 @@ class CommsClient {
|
|||||||
|
|
||||||
var ths = this;
|
var ths = this;
|
||||||
this._listener = m => ths.processReceivedMessage(m);
|
this._listener = m => ths.processReceivedMessage(m);
|
||||||
this.port.onMessage.removeListener(this._listener);
|
if (!BrowserDetect.edge) {
|
||||||
|
this.port.onMessage.removeListener(this._listener);
|
||||||
|
}
|
||||||
this.port.onMessage.addListener(this._listener);
|
this.port.onMessage.addListener(this._listener);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,8 @@ class Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async get() {
|
async get() {
|
||||||
if (BrowserDetect.firefox || BrowserDetect.edge) {
|
if (BrowserDetect.firefox) {
|
||||||
const ret = this.useSync ? await browser.storage.sync.get('uwSettings') : await browser.storage.local.get('uwSettings');
|
const ret = await browser.storage.local.get('uwSettings');
|
||||||
try {
|
try {
|
||||||
return JSON.parse(ret.uwSettings);
|
return JSON.parse(ret.uwSettings);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
@ -115,6 +115,11 @@ class Settings {
|
|||||||
chrome.storage.sync.get('uwSettings', (res) => resolve(res));
|
chrome.storage.sync.get('uwSettings', (res) => resolve(res));
|
||||||
});
|
});
|
||||||
return ret['uwSettings'];
|
return ret['uwSettings'];
|
||||||
|
} else if (BrowserDetect.edge) {
|
||||||
|
const ret = new Promise( (resolve, reject) => {
|
||||||
|
browser.storage.sync.get('uwSettings', (res) => resolve(res));
|
||||||
|
});
|
||||||
|
return ret['uwSettings'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,8 +106,6 @@ class PageInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.removeDestroyed();
|
this.removeDestroyed();
|
||||||
|
|
||||||
// console.log("Rescan complete. Total videos?", this.videos.length)
|
|
||||||
}catch(e){
|
}catch(e){
|
||||||
console.log("rescan error:",e)
|
console.log("rescan error:",e)
|
||||||
}
|
}
|
||||||
|
3
js/uw.js
3
js/uw.js
@ -12,6 +12,9 @@ if(Debug.debug){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BrowserDetect.edge) {
|
||||||
|
HTMLCollection.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
|
||||||
|
}
|
||||||
|
|
||||||
class UW {
|
class UW {
|
||||||
constructor(){
|
constructor(){
|
||||||
|
BIN
releases/edge/ultrawidify_edge_v3.2.2.zip
Normal file
BIN
releases/edge/ultrawidify_edge_v3.2.2.zip
Normal file
Binary file not shown.
@ -146,6 +146,22 @@ strike {
|
|||||||
background-color: #222 !important;
|
background-color: #222 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* BROWSER-SPECIFIC DISABLE */
|
||||||
|
.disabled-edge {
|
||||||
|
pointer-events: none !important;
|
||||||
|
filter: contrast(50%) brightness(40%) grayscale(100%) !important;
|
||||||
|
content: "NOT SUPPORTED IN THIS BROWSER";
|
||||||
|
}
|
||||||
|
.disabled-edge::after {
|
||||||
|
background-color: #333272;
|
||||||
|
color: #d8d9e6;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: .75em;
|
||||||
|
font-variant: small-caps;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* BUTTONS AND INPUTS */
|
/* BUTTONS AND INPUTS */
|
||||||
|
@ -494,7 +494,9 @@ function validateAutoArTimeout(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("click", (e) => {
|
document.addEventListener("click", (e) => {
|
||||||
|
if(Debug.debug) {
|
||||||
|
console.log("[popup.js] something clicked. event:", e, JSON.stringify(e));
|
||||||
|
}
|
||||||
|
|
||||||
function getcmd(e){
|
function getcmd(e){
|
||||||
var command = {};
|
var command = {};
|
||||||
@ -791,7 +793,12 @@ document.addEventListener("click", (e) => {
|
|||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
var command = getcmd(e);
|
var command = getcmd(e);
|
||||||
|
|
||||||
|
if(Debug.debug) {
|
||||||
|
console.log("[popup.js] Got command (can be undefined):", command, JSON.stringify(command))
|
||||||
|
}
|
||||||
|
|
||||||
if(command)
|
if(command)
|
||||||
port.postMessage(command);
|
port.postMessage(command);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user