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