Setup new config.json and fixed typescript errors in the popup

This commit is contained in:
Ajay Ramachandran
2020-02-01 16:26:57 -05:00
parent d77f8abf42
commit 16c720e500
8 changed files with 1164 additions and 10 deletions

3
config.json Normal file
View File

@@ -0,0 +1,3 @@
{
"serverAddress": "http://localhost"
}

4
config.json.example.json Normal file
View File

@@ -0,0 +1,4 @@
{
"serverAddress": "https://sponsor.ajay.app",
"serverAddressComment": "This specifies the default SponsorBlock server to conect to":
}

View File

@@ -2,8 +2,8 @@
<head>
<title>__MSG_openPopup__</title>
<script src="SB.js"></script>
<link id="sponorBlockPopupFont" rel="stylesheet" type="text/css" href="/libs/Source+Sans+Pro.css"/>
<link id="sponorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css"/>
<link id="sponsorBlockPopupFont" rel="stylesheet" type="text/css" href="/libs/Source+Sans+Pro.css"/>
<link id="sponsorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css"/>
</head>
<body class="popupBody">

View File

@@ -1,3 +0,0 @@
//this file is loaded along iwth content.js
//this file sets the server to connect to, and is gitignored
var serverAddress = "https://sponsor.ajay.app";

View File

@@ -800,8 +800,8 @@ function openInfoMenu() {
logo.src = chrome.extension.getURL("icons/LogoSponsorBlocker256px.png");
//remove the style sheet and font that are not necessary
popup.querySelector("#sponorBlockPopupFont").remove();
popup.querySelector("#sponorBlockStyleSheet").remove();
popup.querySelector("#sponsorBlockPopupFont").remove();
popup.querySelector("#sponsorBlockStyleSheet").remove();
parentNode.insertBefore(popup, parentNode.firstChild);

1150
src/popup.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -4,9 +4,9 @@
"target": "es6",
"noImplicitAny": false,
"sourceMap": false,
"rootDir": "src",
"outDir": "dist/js",
"noEmitOnError": true,
"typeRoots": [ "node_modules/@types" ]
"typeRoots": [ "node_modules/@types" ],
"resolveJsonModule": true
}
}

View File

@@ -7,7 +7,7 @@ module.exports = {
entry: {
popup: path.join(__dirname, srcDir + 'popup.ts'),
background: path.join(__dirname, srcDir + 'background.ts'),
content_script: path.join(__dirname, srcDir + 'content_script.ts')
content_script: path.join(__dirname, srcDir + 'content.ts')
},
output: {
path: path.join(__dirname, '../dist/js'),