//Sun Jun 01 2025 09:35:39 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
function checkCurrentUrl() {
chrome.tabs.query({
active: true,
currentWindow: true
}, function (_0x1a2a86) {
var _0x1a2a86 = _0x1a2a86[0].url.includes("channels.weixin.qq.com/platform/post/list");
var _0x381a59 = document.querySelector("#urlStatus span");
_0x1a2a86 ? (_0x381a59.textContent = "已在视频号助手页面", _0x381a59.style.color = "#07c160") : (_0x381a59.textContent = "未在视频号助手页面", _0x381a59.style.color = "#f86228");
});
}
function saveSettings(_0x668450) {
chrome.storage.sync.set(_0x668450);
}
function loadSettings() {
chrome.storage.sync.get(["flowRate"], function (_0x250d7f) {
document.getElementById("flowRate").checked = _0x250d7f.flowRate || false;
});
}
function checkUpdateStatus() {
chrome.storage.local.get(["updateAvailable", "newVersion", "updateUrl", "releaseNotes"], _0x100359 => {
var _0x43fed7;
var _0x4dc2fb;
var _0x5573c1;
_0x100359.updateAvailable && (_0x43fed7 = document.getElementById("updateNotice"), _0x4dc2fb = document.getElementById("updateLink"), _0x5573c1 = document.getElementById("releaseNotes"), _0x43fed7.style.display = "block", _0x4dc2fb.href = _0x100359.updateUrl, _0x5573c1.textContent = _0x100359.releaseNotes);
});
}
document.addEventListener("DOMContentLoaded", () => {
console.log("Popup loaded");
checkCurrentUrl();
loadSettings();
checkUpdateStatus();
let _0x50cb69 = document.getElementById("flowRate");
chrome.storage.sync.get(["monitoringEnabled"], function (_0xf68d50) {
_0x50cb69.checked = _0xf68d50.monitoringEnabled || false;
});
_0x50cb69.addEventListener("change", _0x4030f9 => {
let _0x4c7c7e = _0x4030f9.target.checked;
chrome.storage.sync.set({
monitoringEnabled: _0x4c7c7e
});
chrome.tabs.query({
active: true,
currentWindow: true
}, function (_0x5bd678) {
chrome.tabs.sendMessage(_0x5bd678[0].id, {
type: "TOGGLE_FLOW_RATE",
enabled: _0x4c7c7e
});
});
});
});