mirror of
https://wiilab.wiimart.org/wiimart/wiimart-extension
synced 2025-09-03 20:11:04 +02:00
got fucking past check registered
This commit is contained in:
parent
3791abd232
commit
f8b2c601bf
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
test/*
|
@ -2,6 +2,7 @@ const _injectedWiiShopSoundUrls = window._wiiShopSoundUrls_ || [];
|
|||||||
const _injectedWiiShopBgmUrl = window._wiiShopBgmUrl_ || '';
|
const _injectedWiiShopBgmUrl = window._wiiShopBgmUrl_ || '';
|
||||||
const _bgmInitiallyEnabled = window._wiiShopBgmInitiallyEnabled_ === true;
|
const _bgmInitiallyEnabled = window._wiiShopBgmInitiallyEnabled_ === true;
|
||||||
const _bgmAlreadyPlaying = window._bgmAlreadyPlaying || false;
|
const _bgmAlreadyPlaying = window._bgmAlreadyPlaying || false;
|
||||||
|
const _currentstatus = window._currentstatus || "";
|
||||||
|
|
||||||
var ecsUrl = "";
|
var ecsUrl = "";
|
||||||
var iasUrl = "";
|
var iasUrl = "";
|
||||||
@ -104,7 +105,7 @@ class ECommerceInterface {
|
|||||||
if (window.location.pathname === unwantedPath) {
|
if (window.location.pathname === unwantedPath) {
|
||||||
//window.location.pathname = "/oss/serv/W_01.jsp";
|
//window.location.pathname = "/oss/serv/W_01.jsp";
|
||||||
console.log("Do nothing...");
|
console.log("Do nothing...");
|
||||||
}
|
}/*
|
||||||
this._titlesMap = new Map([
|
this._titlesMap = new Map([
|
||||||
["0001000248414241", {
|
["0001000248414241", {
|
||||||
name: 'Wii Shop Channel',
|
name: 'Wii Shop Channel',
|
||||||
@ -116,7 +117,7 @@ class ECommerceInterface {
|
|||||||
version: '1',
|
version: '1',
|
||||||
isTmdPresent: true,
|
isTmdPresent: true,
|
||||||
}],
|
}],
|
||||||
]);
|
]);*/
|
||||||
trace("ECommerceInterface initialized"); // Use the trace function
|
trace("ECommerceInterface initialized"); // Use the trace function
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,18 +136,36 @@ class ECommerceInterface {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
getTitleInfo(shopAppTitleId) {
|
getTitleInfo(shopAppTitleId) {
|
||||||
const title = this._titlesMap.get(shopAppTitleId);
|
const title = this._titlesMap.get(shopAppTitleId);
|
||||||
if (!title || typeof title !== 'object' || !title.isTmdPresent || title.version == null) {
|
if (!title || typeof title !== 'object' || !title.isTmdPresent || title.version == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
getTitleInfo(titleid) {
|
getTitleInfo(titleid) {
|
||||||
return {
|
if (titleid === "0001000248414241") {
|
||||||
isOnDevice: false,
|
return {
|
||||||
version: 0,
|
titleId: titleid,
|
||||||
isTmdPresent: false,
|
isOnDevice: true,
|
||||||
|
version: 21,
|
||||||
|
isTmdPresent: true,
|
||||||
|
occupiedUserBlocks: 0,
|
||||||
|
occupiedUserInodes: 0,
|
||||||
|
occupiedSysBlocks: 1599,
|
||||||
|
occupiedSysInodes: 23
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
titleId: titleid,
|
||||||
|
isOnDevice: false,
|
||||||
|
version: 0,
|
||||||
|
isTmdPresent: false,
|
||||||
|
occupiedUserBlocks: 0,
|
||||||
|
occupiedUserInodes: 0,
|
||||||
|
occupiedSysBlocks: 0,
|
||||||
|
occupiedSysInodes: 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getLog() {
|
getLog() {
|
||||||
@ -190,6 +209,7 @@ class ECommerceInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCachedBalance() {
|
getCachedBalance() {
|
||||||
|
window._currentstatus = "getCachedBalance"
|
||||||
const storedPoints = window.localStorage.getItem('points');
|
const storedPoints = window.localStorage.getItem('points');
|
||||||
if (storedPoints) {
|
if (storedPoints) {
|
||||||
return parseInt(storedPoints, 10);
|
return parseInt(storedPoints, 10);
|
||||||
@ -200,38 +220,52 @@ class ECommerceInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
refreshCachedBalance() {
|
refreshCachedBalance() {
|
||||||
|
window._currentstatus = "refreshCachedBalance"
|
||||||
|
return {
|
||||||
|
status: 0,
|
||||||
|
operation: "refreshCachedBalance",
|
||||||
|
description: "",
|
||||||
|
phase: 7,
|
||||||
|
isCancelRequested: "false",
|
||||||
|
downloadedSize: 0,
|
||||||
|
totalSize: 0,
|
||||||
|
errCode: 0,
|
||||||
|
errInfo: null,
|
||||||
|
};
|
||||||
|
/*
|
||||||
const storedPoints = window.localStorage.getItem('points');
|
const storedPoints = window.localStorage.getItem('points');
|
||||||
if (storedPoints) {
|
if (storedPoints) {
|
||||||
return parseInt(storedPoints, 10);
|
return parseInt(storedPoints, 10);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
checkDeviceStatus() {
|
checkDeviceStatus() {
|
||||||
|
window._currentstatus = "checkDeviceStatus";
|
||||||
return {
|
return {
|
||||||
status: 0,
|
status: 0,
|
||||||
operation: "checkDeviceStatus",
|
operation: "checkDeviceStatus",
|
||||||
description: "",
|
description: "",
|
||||||
phase: 17,
|
phase: 17,
|
||||||
isCancelRequested: "false",
|
isCancelRequested: "false",
|
||||||
downloadedSize: 888,
|
downloadedSize: 0,
|
||||||
totalSize: 888,
|
totalSize: 0,
|
||||||
errCode: "",
|
errCode: 0,
|
||||||
errInfo: "",
|
errInfo: null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getDeviceInfo() {
|
getDeviceInfo() {
|
||||||
return {
|
return {
|
||||||
country: "CA", // Example value
|
country: "US", // Example value
|
||||||
region: "USA", // Example value
|
region: "USA", // Example value
|
||||||
isParentalControlEnabled: false, // Example value
|
isParentalControlEnabled: false, // Example value
|
||||||
userAge: 20, // Example value
|
userAge: 20, // Example value
|
||||||
language: "fr", // Example value
|
language: "fr", // Example value
|
||||||
accountId: "659247", // Example value
|
accountId: "659247864", // Example value
|
||||||
deviceId: "458757", // Example value
|
deviceId: "4587571479", // Example value
|
||||||
serial: "PC156494873", // Example value
|
serial: "PC156494873", // Example value
|
||||||
maxUserInodes: 200000,
|
maxUserInodes: 200000,
|
||||||
usedUserInodes: 100000,
|
usedUserInodes: 100000,
|
||||||
@ -245,7 +279,9 @@ class ECommerceInterface {
|
|||||||
titleId: "0001000248414241",
|
titleId: "0001000248414241",
|
||||||
accountCountry: "CA",
|
accountCountry: "CA",
|
||||||
deviceCode: "0302167078436756",
|
deviceCode: "0302167078436756",
|
||||||
accountDeviceCode: this.deviceCode,
|
accountDeviceCode: "0302167078436756",
|
||||||
|
isKeyPairConfirmed: function() { return true; },
|
||||||
|
registrationStatus: "R",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
setSessionValue(key, value) {
|
setSessionValue(key, value) {
|
||||||
@ -263,11 +299,58 @@ class ECommerceInterface {
|
|||||||
return 100;
|
return 100;
|
||||||
}
|
}
|
||||||
getProgress() {
|
getProgress() {
|
||||||
console.log("idk what to return its a progress?");
|
var downsize = 0;
|
||||||
return 100;
|
if (window._currentstatus === "checkRegistration") {
|
||||||
|
downsize = 727;
|
||||||
|
} else if (window._currentstatus === "syncRegistration") {
|
||||||
|
downsize = 913;
|
||||||
|
} else if (window._currentstatus === "checkDeviceStatus") {
|
||||||
|
downsize = 846;
|
||||||
|
} else if (window._currentstatus === "refreshCachedBalance") {
|
||||||
|
downsize = 731;
|
||||||
|
} else {
|
||||||
|
downsize = 0;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
"status": 0,
|
||||||
|
"operation": window._currentstatus,
|
||||||
|
"description": "",
|
||||||
|
"phase": 2,
|
||||||
|
"isCancelRequested": false,
|
||||||
|
"downloadedSize": downsize,
|
||||||
|
"totalSize": 0,
|
||||||
|
"errCode": 0,
|
||||||
|
"errInfo": null
|
||||||
|
};
|
||||||
}
|
}
|
||||||
checkRegistration() {
|
checkRegistration() {
|
||||||
return true;
|
window._currentstatus = "checkRegistration";
|
||||||
|
return {
|
||||||
|
"status": 0,
|
||||||
|
"operation": "checkRegistration",
|
||||||
|
"description": "",
|
||||||
|
"phase": 11,
|
||||||
|
"isCancelRequested": false,
|
||||||
|
"downloadedSize": 0,
|
||||||
|
"totalSize": 0,
|
||||||
|
"errCode": 0,
|
||||||
|
"errInfo": null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
syncRegistration(value) {
|
||||||
|
console.log("idk what to do with this: " + value);
|
||||||
|
window._currentstatus = "syncRegistration";
|
||||||
|
return {
|
||||||
|
"status": 0,
|
||||||
|
"operation": "syncRegistration",
|
||||||
|
"description": "",
|
||||||
|
"phase": 18,
|
||||||
|
"isCancelRequested": false,
|
||||||
|
"downloadedSize": 0,
|
||||||
|
"totalSize": 0,
|
||||||
|
"errCode": 0,
|
||||||
|
"errInfo": null
|
||||||
|
};
|
||||||
}
|
}
|
||||||
getWeakToken() {
|
getWeakToken() {
|
||||||
return "iamaweaktoken";
|
return "iamaweaktoken";
|
||||||
@ -275,6 +358,17 @@ class ECommerceInterface {
|
|||||||
getVersion() {
|
getVersion() {
|
||||||
return parseInt("21");
|
return parseInt("21");
|
||||||
}
|
}
|
||||||
|
request(value) {
|
||||||
|
if (value === "checkRegistration") {
|
||||||
|
return this.checkRegistration();
|
||||||
|
} else if (value === "checkDeviceStatus") {
|
||||||
|
return this.checkDeviceStatus();
|
||||||
|
} else if (value === "refreshCachedBalance") {
|
||||||
|
return this.refreshCachedBalance();
|
||||||
|
} else if (value === "getCachedBalance") {
|
||||||
|
return this.getCachedBalance();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class wiiShop {
|
class wiiShop {
|
||||||
@ -282,6 +376,7 @@ class wiiShop {
|
|||||||
trace("wiiShop initialized"); // Use the trace function
|
trace("wiiShop initialized"); // Use the trace function
|
||||||
return "isok";
|
return "isok";
|
||||||
}
|
}
|
||||||
|
connecting = null;
|
||||||
retry() {
|
retry() {
|
||||||
window.location.pathname = "/oss/serv/W_01.jsp";
|
window.location.pathname = "/oss/serv/W_01.jsp";
|
||||||
}
|
}
|
||||||
@ -328,6 +423,7 @@ class wiiShop {
|
|||||||
isCompatibleMode() {
|
isCompatibleMode() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
launchCode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
class wiiSound {
|
class wiiSound {
|
||||||
@ -487,6 +583,7 @@ class wiiNwc24 {
|
|||||||
return "111"
|
return "111"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
myUserId = "0302167078436756";
|
||||||
}
|
}
|
||||||
class wiiDlTask {
|
class wiiDlTask {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -7,6 +7,7 @@ console.log("Content script is running.");
|
|||||||
let fontLoaded = false;
|
let fontLoaded = false;
|
||||||
|
|
||||||
function loadFont() {
|
function loadFont() {
|
||||||
|
return "nuh uh";
|
||||||
const fontUrl = chrome.runtime.getURL("fonts/fot_rodin_pro_m.ttf");
|
const fontUrl = chrome.runtime.getURL("fonts/fot_rodin_pro_m.ttf");
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.textContent = `
|
style.textContent = `
|
||||||
@ -102,6 +103,7 @@ function loadFont() {
|
|||||||
function checkFontState() {
|
function checkFontState() {
|
||||||
chrome.storage.local.get(['fontDisabled'], function(result) {
|
chrome.storage.local.get(['fontDisabled'], function(result) {
|
||||||
if (!result.fontDisabled) {
|
if (!result.fontDisabled) {
|
||||||
|
return "disabled";
|
||||||
return loadFont();
|
return loadFont();
|
||||||
} else {
|
} else {
|
||||||
return "disabled";
|
return "disabled";
|
||||||
|
@ -25,7 +25,8 @@
|
|||||||
"https://oss-auth.thecheese.io/*",
|
"https://oss-auth.thecheese.io/*",
|
||||||
"https://oss-auth.shop.wii.com/*",
|
"https://oss-auth.shop.wii.com/*",
|
||||||
"http://wiimart:8080/oss/serv/*",
|
"http://wiimart:8080/oss/serv/*",
|
||||||
"https://wiimart:8080/oss/serv/*"
|
"https://wiimart:8080/oss/serv/*",
|
||||||
|
"https://localhost/oss/serv*"
|
||||||
],
|
],
|
||||||
"js": ["content.js"],
|
"js": ["content.js"],
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
@ -44,7 +45,8 @@
|
|||||||
"https://oss-auth.thecheese.io/*",
|
"https://oss-auth.thecheese.io/*",
|
||||||
"https://oss-auth.shop.wii.com/*",
|
"https://oss-auth.shop.wii.com/*",
|
||||||
"http://wiimart:8080/oss/serv/*",
|
"http://wiimart:8080/oss/serv/*",
|
||||||
"https://wiimart:8080/oss/serv/*"
|
"https://wiimart:8080/oss/serv/*",
|
||||||
|
"https://localhost/oss/serv*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
"https://oss-auth.thecheese.io/*",
|
"https://oss-auth.thecheese.io/*",
|
||||||
"https://oss-auth.shop.wii.com/*",
|
"https://oss-auth.shop.wii.com/*",
|
||||||
"http://wiimart:8080/oss/serv/*",
|
"http://wiimart:8080/oss/serv/*",
|
||||||
"https://wiimart:8080/oss/serv/*"
|
"https://wiimart:8080/oss/serv/*",
|
||||||
|
"https://localhost/oss/serv*"
|
||||||
],
|
],
|
||||||
"js": ["content.js"],
|
"js": ["content.js"],
|
||||||
"run_at": "document_start"
|
"run_at": "document_start"
|
||||||
@ -45,7 +46,8 @@
|
|||||||
"https://oss-auth.thecheese.io/*",
|
"https://oss-auth.thecheese.io/*",
|
||||||
"https://oss-auth.shop.wii.com/*",
|
"https://oss-auth.shop.wii.com/*",
|
||||||
"http://wiimart:8080/oss/serv/*",
|
"http://wiimart:8080/oss/serv/*",
|
||||||
"https://wiimart:8080/oss/serv/*"
|
"https://wiimart:8080/oss/serv/*",
|
||||||
|
"https://localhost/oss/serv*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user