mirror of
https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension.git
synced 2024-11-22 08:03:49 +00:00
minor: UI changes
This commit is contained in:
parent
bb966b603c
commit
aa3dc44707
@ -7,7 +7,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"release": "yarn config set version-tag-prefix brave-detection-blocker@v && yarn config set version-git-message 'brave-detection-blocker@v%s' && yarn version --patch && yarn postversion",
|
||||
"postversion": "git push",
|
||||
"pub": "node ./scripts/create-release.js"
|
||||
"pub": "yarn release && node ./scripts/create-release.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
17
popup.html
17
popup.html
@ -81,6 +81,21 @@
|
||||
.container--tabs .tab-content > .active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* GitHub Link */
|
||||
.github-link {
|
||||
color: #e6e6e6;
|
||||
text-decoration: none;
|
||||
font-size: 0.85rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.github-link:hover {
|
||||
color: #f44336;
|
||||
transform: scale(1.1);
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -121,7 +136,7 @@
|
||||
(Don't know why you would employ such effort but I'm just trying to be techincal.)
|
||||
<br /><br />
|
||||
<h3>Check source at:</h3>
|
||||
<a href="https://https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension">
|
||||
<a class="github-link" href="https://https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension">
|
||||
https://github.com/andrei0x309/Brave-Detection-Blocker-Chrome-Extension
|
||||
</a>
|
||||
</div>
|
||||
|
103
popup.js
103
popup.js
@ -1,6 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
window.addEventListener(
|
||||
'message',
|
||||
(event) => {
|
||||
@ -11,108 +10,6 @@ window.addEventListener(
|
||||
false,
|
||||
);
|
||||
|
||||
// let btn_close_alert = document.getElementById('closeAlertBtn');
|
||||
|
||||
// const btnProxyStop = document.getElementById('btnProxyStop');
|
||||
// const btnProxyStart = document.getElementById('btnProxyStart');
|
||||
|
||||
|
||||
|
||||
// const proxyTypeGroup = document.getElementById('proxyTypeGroup');
|
||||
|
||||
// const btnProxyType = [
|
||||
// document.getElementById('btnProxyTypeHttp'),
|
||||
// document.getElementById('btnProxyTypeHttps'),
|
||||
// document.getElementById('btnProxyTypeSocks4'),
|
||||
// document.getElementById('btnProxyTypeSocks5'),
|
||||
// ];
|
||||
|
||||
// for (const btn of btnProxyType) {
|
||||
// if (btn) {
|
||||
// btn.onclick = async function () {
|
||||
// const active = proxyTypeGroup.querySelector('.btn-green');
|
||||
// if (active) {
|
||||
// active.classList.remove('btn-green');
|
||||
// }
|
||||
// this.classList.add('btn-green');
|
||||
// bgP.window.extOptions.activeProxy.type = this.id.replace('btnProxyType', '').toLowerCase();
|
||||
// await bgP.window.setOptions(bgP.window.extOptions);
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
// const spanProxyStatusOn = document.getElementById('spanProxyStatusOn');
|
||||
// const spanProxyStatusOff = document.getElementById('spanProxyStatusOff');
|
||||
|
||||
// const inputproxyHost = document.getElementById('proxyHost');
|
||||
// const inputproxyPort = document.getElementById('proxyPort');
|
||||
|
||||
// const updatePopup = function (options) {
|
||||
// if (options.proxyEnabled) {
|
||||
// spanProxyStatusOff.classList.add('hidden');
|
||||
// spanProxyStatusOn.classList.remove('hidden');
|
||||
|
||||
// btnProxyStart.classList.add('hidden');
|
||||
// btnProxyStop.classList.remove('hidden');
|
||||
// } else {
|
||||
// spanProxyStatusOn.classList.add('hidden');
|
||||
// spanProxyStatusOff.classList.remove('hidden');
|
||||
|
||||
// btnProxyStart.classList.remove('hidden');
|
||||
// btnProxyStop.classList.add('hidden');
|
||||
// }
|
||||
|
||||
// if (options.activeProxy) {
|
||||
// const types = ['http', 'https', 'socks4', 'socks5'];
|
||||
// if (options.activeProxy.type) btnProxyType[types.indexOf(options.activeProxy.type)].classList.add('btn-green');
|
||||
// inputproxyHost.value = options.activeProxy.host;
|
||||
// inputproxyPort.value = options.activeProxy.port;
|
||||
// }
|
||||
// };
|
||||
|
||||
// updatePopup(bgP.window.extOptions);
|
||||
|
||||
// btnProxyStop.onclick = function () {
|
||||
// bgP.window.extOptions.proxyEnabled = false;
|
||||
// bgP.window.setOptions(bgP.window.extOptions);
|
||||
// bgP.window.disableProxy();
|
||||
// updatePopup(bgP.window.extOptions);
|
||||
// };
|
||||
|
||||
// btnProxyStart.onclick = function () {
|
||||
// bgP.window.extOptions.activeProxy.host = inputproxyHost.value;
|
||||
// bgP.window.extOptions.activeProxy.port = inputproxyPort.value;
|
||||
// bgP.window.extOptions.proxyEnabled = true;
|
||||
// bgP.window.setOptions(bgP.window.extOptions);
|
||||
// bgP.window.setProxy(bgP.window.extOptions.activeProxy);
|
||||
// updatePopup(bgP.window.extOptions);
|
||||
// };
|
||||
|
||||
// let displayAlert = (type, msg) => {
|
||||
// if (type === 'error') {
|
||||
// document.getElementById('exAlertBox').classList.remove('alert-success');
|
||||
// document.getElementById('exAlertBox').classList.add('alert-warning');
|
||||
// } else if (type === 'success') {
|
||||
// document.getElementById('exAlertBox').classList.remove('alert-warning');
|
||||
// document.getElementById('exAlertBox').classList.add('alert-success');
|
||||
// }
|
||||
|
||||
// document.getElementById('alertMsg').innerHTML = msg;
|
||||
// document.getElementById('exAlert').classList.remove('hidden');
|
||||
// };
|
||||
|
||||
// let closeAlert = () => {
|
||||
// const alert = document.getElementById('exAlert');
|
||||
// if (alert) {
|
||||
// document.getElementById('exAlert').classList.add('hidden');
|
||||
// }
|
||||
// };
|
||||
// closeAlert();
|
||||
|
||||
// btn_close_alert.addEventListener('click', function () {
|
||||
// closeAlert();
|
||||
// });
|
||||
|
||||
const myTabs = document.querySelectorAll('ul.nav-tabs > li');
|
||||
function myTabClicks(tabClickEvent) {
|
||||
for (let i = 0; i < myTabs.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user