Fix indentation, bump version

This commit is contained in:
shirtjs 2021-09-08 10:51:45 -04:00
parent 28b4b01913
commit 099dfd0107
3 changed files with 70 additions and 68 deletions

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Netflix International",
"description": "Displays all available Netflix audio tracks.",
"version": "2.0.3",
"version": "2.0.4",
"author": "shirt",
"browser_action": {
"default_icon": "img/icon128.png"

View file

@ -1,3 +1,4 @@
/* eslint-disable no-undef */
let getElementByXPath = function (xpath) {
return document.evaluate(
xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null
@ -5,7 +6,7 @@ let getElementByXPath = function (xpath) {
};
const fn = function () {
window.dispatchEvent(new KeyboardEvent('keydown', {
window.dispatchEvent(new KeyboardEvent("keydown", {
keyCode: 83,
ctrlKey: true,
altKey: true,
@ -23,13 +24,13 @@ const fn = function () {
[VIDEO_SELECT, AUDIO_SELECT].forEach(function (el) {
let parent = el.parentElement;
let options = parent.querySelectorAll('select > option');
let options = parent.querySelectorAll("select > option");
for (var i = 0; i < options.length - 1; i++) {
options[i].removeAttribute('selected');
options[i].removeAttribute("selected");
}
options[options.length - 1].setAttribute('selected', 'selected');
options[options.length - 1].setAttribute("selected", "selected");
});
BUTTON.click();

View file

@ -1,3 +1,4 @@
/* eslint-disable no-undef */
function save_options() {
const use6Channels = document.getElementById("use51").checked;
const showAllTracks = document.getElementById("showAllTracks").checked;
@ -10,10 +11,10 @@ function save_options() {
setMaxBitrate,
disableVP9,
}, function() {
var status = document.getElementById('status');
status.textContent = 'Options saved.';
var status = document.getElementById("status");
status.textContent = "Options saved.";
setTimeout(function() {
status.textContent = '';
status.textContent = "";
}, 750);
});
}
@ -32,5 +33,5 @@ function restore_options() {
});
}
document.addEventListener('DOMContentLoaded', restore_options);
document.getElementById('save').addEventListener('click', save_options);
document.addEventListener("DOMContentLoaded", restore_options);
document.getElementById("save").addEventListener("click", save_options);