mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 03:30:14 +00:00
manually fix remaining lint errors
This commit is contained in:
parent
ee7da0e726
commit
9c535d27e6
@ -7,6 +7,10 @@ module.exports = {
|
|||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
|
globals: {
|
||||||
|
browser: 'readonly',
|
||||||
|
chrome: 'readonly',
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
strict: ['error', 'global'],
|
strict: ['error', 'global'],
|
||||||
'no-unused-vars': ['error', { vars: 'local' }],
|
'no-unused-vars': ['error', { vars: 'local' }],
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
extension background script listening for events
|
extension background script listening for events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
console.log('running background.js');
|
console.log('running background.js');
|
||||||
|
|
||||||
let browserType = getBrowser();
|
let browserType = getBrowser();
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
Loaded into popup index.html
|
Loaded into popup index.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
let browserType = getBrowser();
|
let browserType = getBrowser();
|
||||||
|
|
||||||
// boilerplate to dedect browser type api
|
// boilerplate to dedect browser type api
|
||||||
@ -124,7 +126,7 @@ function setCookieState() {
|
|||||||
// change status icon based on connection status
|
// change status icon based on connection status
|
||||||
function setStatusIcon(connected) {
|
function setStatusIcon(connected) {
|
||||||
let statusIcon = document.getElementById('status-icon');
|
let statusIcon = document.getElementById('status-icon');
|
||||||
if (connected == true) {
|
if (connected) {
|
||||||
statusIcon.innerHTML = '☑';
|
statusIcon.innerHTML = '☑';
|
||||||
statusIcon.style.color = 'green';
|
statusIcon.style.color = 'green';
|
||||||
} else {
|
} else {
|
||||||
@ -161,10 +163,6 @@ document.addEventListener('DOMContentLoaded', async () => {
|
|||||||
setCookieState();
|
setCookieState();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onError(error) {
|
|
||||||
console.log(`Error: ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
browserType.storage.local.get('access', function (result) {
|
browserType.storage.local.get('access', function (result) {
|
||||||
onGot(result);
|
onGot(result);
|
||||||
});
|
});
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
content script running on youtube.com
|
content script running on youtube.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
let browserType = getBrowser();
|
let browserType = getBrowser();
|
||||||
|
|
||||||
// boilerplate to dedect browser type api
|
// boilerplate to dedect browser type api
|
||||||
@ -129,7 +131,7 @@ function buildSubLink(channelContainer) {
|
|||||||
});
|
});
|
||||||
subLink.addEventListener('mouseover', e => {
|
subLink.addEventListener('mouseover', e => {
|
||||||
let subText;
|
let subText;
|
||||||
if (window.location.pathname == '/watch') {
|
if (window.location.pathname === '/watch') {
|
||||||
let currentLocation = window.location.href;
|
let currentLocation = window.location.href;
|
||||||
subText = currentLocation;
|
subText = currentLocation;
|
||||||
} else {
|
} else {
|
||||||
@ -165,7 +167,7 @@ function buildDlLink(channelContainer) {
|
|||||||
});
|
});
|
||||||
dlLink.addEventListener('mouseover', e => {
|
dlLink.addEventListener('mouseover', e => {
|
||||||
let subText;
|
let subText;
|
||||||
if (window.location.pathname == '/watch') {
|
if (window.location.pathname === '/watch') {
|
||||||
let currentLocation = window.location.href;
|
let currentLocation = window.location.href;
|
||||||
subText = currentLocation;
|
subText = currentLocation;
|
||||||
} else {
|
} else {
|
||||||
@ -231,7 +233,7 @@ function buildVideoButton(thumbContainer) {
|
|||||||
let videoTitle = thumbContainer.href;
|
let videoTitle = thumbContainer.href;
|
||||||
e.target.title = 'TA download: ' + videoTitle;
|
e.target.title = 'TA download: ' + videoTitle;
|
||||||
});
|
});
|
||||||
dlButton.addEventListener('mouseout', e => {
|
dlButton.addEventListener('mouseout', () => {
|
||||||
Object.assign(dlButton.style, {
|
Object.assign(dlButton.style, {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
});
|
});
|
||||||
@ -321,7 +323,7 @@ function buttonError(button) {
|
|||||||
buttonSpan.style.color = 'red';
|
buttonSpan.style.color = 'red';
|
||||||
|
|
||||||
button.style.opacity = 1;
|
button.style.opacity = 1;
|
||||||
button.addEventListener('mouseout', e => {
|
button.addEventListener('mouseout', () => {
|
||||||
Object.assign(button.style, {
|
Object.assign(button.style, {
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user