mirror of
https://github.com/anatolykopyl/vk-mute.git
synced 2026-03-26 21:05:16 +00:00
Заменил изображение кнопки
This commit is contained in:
@@ -77,6 +77,11 @@ input:checked + .slider:before {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 0;
|
||||
padding: .5rem 0 .5rem 0;
|
||||
}
|
||||
|
||||
.idToHide {
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
@@ -101,3 +106,12 @@ input:checked + .slider:before {
|
||||
.del_item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.donation_btn {
|
||||
cursor: pointer;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.donation_btn > a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h3 align="center" id="status"></h3>
|
||||
<h3 align="center">Vk Mute</h3>
|
||||
</div>
|
||||
<!--<button id="disableButton">Toggle</button>-->
|
||||
<div style="text-align: center;">
|
||||
@@ -16,5 +16,8 @@
|
||||
</div>
|
||||
<div id="id_list">
|
||||
</div>
|
||||
<div class="donation_btn">
|
||||
<a href="./donate.html" target="_blank">💸</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,18 +4,14 @@ import './popup.css'
|
||||
let disableCheckbox = document.getElementById('disableCheckbox');
|
||||
let idsToHideElements = document.getElementsByClassName('idToHide');
|
||||
let idList = document.getElementById("id_list");
|
||||
let status = document.getElementById('status');
|
||||
let isExtensionOn;
|
||||
let idsToHide = [];
|
||||
|
||||
let enableText = "Вкл";
|
||||
let disableText = "Выкл";
|
||||
|
||||
function idBtnHTML(id) {
|
||||
const element = document.createElement('div');
|
||||
element.setAttribute('class', 'idToHide');
|
||||
element.innerHTML = `
|
||||
<a href="https://vk.com/id${id}" target="_blank" title="Перейти в профиль">🧑 id${id}</a>
|
||||
<a href="https://vk.com/id${id}" target="_blank" title="Перейти в профиль">🤐 id${id}</a>
|
||||
<span class="del_item" title="Удалить">🗑️</span>
|
||||
`;
|
||||
element.id = id;
|
||||
@@ -26,11 +22,6 @@ chrome.storage.sync.get('isExtensionOn', function(data) {
|
||||
isExtensionOn = data.isExtensionOn;
|
||||
|
||||
disableCheckbox.checked = isExtensionOn;
|
||||
if (isExtensionOn) {
|
||||
status.innerHTML = enableText;
|
||||
} else {
|
||||
status.innerHTML = disableText;
|
||||
}
|
||||
});
|
||||
|
||||
chrome.storage.sync.get('idsToHide', function(data) {
|
||||
@@ -59,11 +50,6 @@ chrome.storage.sync.get('idsToHide', function(data) {
|
||||
|
||||
disableCheckbox.addEventListener('change', (event) => {
|
||||
isExtensionOn = event.target.checked;
|
||||
if (event.target.checked) {
|
||||
status.innerHTML = enableText;
|
||||
} else {
|
||||
status.innerHTML = disableText;
|
||||
}
|
||||
|
||||
chrome.storage.sync.set({isExtensionOn}, function() {
|
||||
console.log('isExtensionOn: '+isExtensionOn);
|
||||
|
||||
Reference in New Issue
Block a user