mirror of
https://wiilab.wiimart.org/wiimart/wiimart-extension
synced 2025-09-02 19:41:00 +02:00
changes
This commit is contained in:
parent
2cdfb1e912
commit
ff645bd4a6
@ -11,28 +11,21 @@ function blockRequest(details) {
|
||||
|
||||
// Check if the browser is Firefox or Chrome
|
||||
const isFirefox = typeof browser !== "undefined";
|
||||
|
||||
|
||||
|
||||
// background.js
|
||||
|
||||
// Listen for web requests
|
||||
// Handle all miip:// requests
|
||||
chrome.webRequest.onBeforeRequest.addListener(
|
||||
function(details) {
|
||||
// Check if the URL matches the pattern
|
||||
const urlPattern = /^miip:\/\/CID\/.*\.bmp\?width=48&height=48&bgR=\d{1,3}&bgG=\d{1,3}&bgB=\d{1,3}$/;
|
||||
if (urlPattern.test(details.url)) {
|
||||
// Redirect to the image stored in the extension
|
||||
return { redirectUrl: chrome.runtime.getURL("images/mii.bmp") };
|
||||
console.log("[DEBUG] Intercepted URL:", details.url);
|
||||
|
||||
if (details.url.startsWith('miip://')) {
|
||||
const redirectUrl = chrome.runtime.getURL("images/mii.bmp");
|
||||
console.log("[DEBUG] Redirecting to:", redirectUrl);
|
||||
return { redirectUrl: redirectUrl };
|
||||
}
|
||||
return {};
|
||||
},
|
||||
{ urls: [
|
||||
"https://oss-auth.blinklab.com/*",
|
||||
"https://oss-auth.thecheese.io/*",
|
||||
"https://oss-auth.shop.wii.com/*",
|
||||
"http://wiimart:8080/oss/serv/*",
|
||||
"https://wiimart:8080/oss/serv/*"
|
||||
]}, // You can restrict this to specific URLs if needed
|
||||
{ urls: ["<all_urls>"] },
|
||||
["blocking"]
|
||||
);
|
||||
|
||||
|
@ -205,7 +205,17 @@ class ECommerceInterface {
|
||||
}
|
||||
|
||||
checkDeviceStatus() {
|
||||
return 1;
|
||||
return {
|
||||
status: 0,
|
||||
operation: "checkDeviceStatus",
|
||||
description: "",
|
||||
phase: 17,
|
||||
isCancelRequested: "false",
|
||||
downloadedSize: 888,
|
||||
totalSize: 888,
|
||||
errCode: "",
|
||||
errInfo: "",
|
||||
};
|
||||
}
|
||||
|
||||
getDeviceInfo() {
|
||||
@ -368,20 +378,22 @@ class wiiNwc24 {
|
||||
fnm = parsedValue; // Convert string to integer
|
||||
}
|
||||
if (data == "name") {
|
||||
if (fnm == 1) {
|
||||
if (fnm == 0) {
|
||||
return "User1";
|
||||
} else if (fnm == 2) {
|
||||
} else if (fnm == 1) {
|
||||
return "User2";
|
||||
} else if (fnm == 3) {
|
||||
} else if (fnm == 2) {
|
||||
return "User3";
|
||||
} else if (fnm == 4) {
|
||||
} else if (fnm == 3) {
|
||||
return "User4";
|
||||
} else if (fnm == 5) {
|
||||
} else if (fnm == 4) {
|
||||
return "User5";
|
||||
}
|
||||
}
|
||||
if (data == "userId") {
|
||||
if (fnm == 1) {
|
||||
if (fnm == 0) {
|
||||
return "3630753603591712";
|
||||
} else if (fnm == 1) {
|
||||
return "3630753603591712";
|
||||
} else if (fnm == 2) {
|
||||
return "3630753603591712";
|
||||
@ -389,8 +401,6 @@ class wiiNwc24 {
|
||||
return "3630753603591712";
|
||||
} else if (fnm == 4) {
|
||||
return "3630753603591712";
|
||||
} else if (fnm == 5) {
|
||||
return "3630753603591712";
|
||||
}
|
||||
}
|
||||
if (data == "miiImage") {
|
||||
@ -406,10 +416,15 @@ class wiiDlTask {
|
||||
trace("yes i got it dw i will download it :tro:");
|
||||
}
|
||||
}
|
||||
|
||||
class wiiMii {
|
||||
constructor() {
|
||||
trace("wiiMii init");
|
||||
}
|
||||
}
|
||||
window.ECommerceInterface = ECommerceInterface;
|
||||
window.ECCreditCardEncryptedPayment = ECCreditCardEncryptedPayment;
|
||||
window.ECPrice = ECPrice;
|
||||
window.wiiKeyboard = wiiKeyboard;
|
||||
window.wiiShop = wiiShop;
|
||||
window.wiiSound = wiiSound;
|
||||
window.wiiMii = wiiMii;
|
||||
|
@ -36,6 +36,7 @@
|
||||
{
|
||||
"resources": [
|
||||
"fonts/*",
|
||||
"images/*",
|
||||
"classDefinitions.js"
|
||||
],
|
||||
"matches": [
|
||||
|
Loading…
x
Reference in New Issue
Block a user