Initial commit

This commit is contained in:
2025-05-26 00:01:52 +02:00
commit 46b8b8a285
7 changed files with 120 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
web-ext-artifacts

BIN
icons/icon128.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
icons/icon16.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
icons/icon48.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

26
manifest.json Normal file
View File

@@ -0,0 +1,26 @@
{
"manifest_version": 3,
"browser_specific_settings": {
"gecko": {
"id": "taken@mairimashita.org",
"strict_min_version": "58.0"
}
},
"name": "PvPRp bypass",
"version": "1.0",
"description": "Removes the requirement to sub for pack download",
"action": {
"default_popup": "popout.html",
"default_icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
"128": "icons/icon128.png"
}
},
"content_scripts": [
{
"matches": ["https://pvprp.com/*"],
"js": ["pvprp.js"]
}
]
}

44
popout.html Normal file
View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<style>
body {
width: 300px;
padding: 15px;
font-family: Arial, sans-serif;
color: #333;
}
h2 {
margin-top: 0;
color: #1a73e8;
font-size: 18px;
}
p {
font-size: 14px;
line-height: 1.5;
margin-bottom: 10px;
}
.footer {
font-size: 12px;
color: #666;
margin-top: 15px;
border-top: 1px solid #eee;
padding-top: 10px;
}
</style>
</head>
<body>
<h2>PvPRp Bypass</h2>
<p>This extension automatically clicks on the download button silently</p>
<p>No more annoying clicking</p>
<div class="footer">
Extension is running in the background. No further action needed.
</div>
</body>
</html>

49
pvprp.js Normal file
View File

@@ -0,0 +1,49 @@
log("Loaded extension")
const downloadButton = document.querySelector('a.activ-download')
const originalHref = downloadButton.href;
const originalTarget = downloadButton.getAttribute('target');
const originalWindowOpen = window.open;
const originalAssign = window.location.assign;
const originalReplace = window.location.replace;
window.open = function() {
log('Intercepted window.open with:', arguments);
return { closed: false };
};
window.location.assign = function(url) {
log('Intercepted location.assign with:', url);
};
window.location.replace = function(url) {
log('Intercepted location.replace with:', url);
};
downloadButton.removeAttribute('target');
downloadButton.href = 'javascript:void(0)';
const clickHandler = downloadButton["click"];
if (typeof clickHandler === 'function') {
try {
clickHandler.call(downloadButton);
} catch (e) {
error('Error executing click handler:', e);
}
}
downloadButton.href = originalHref;
if (originalTarget) {
downloadButton.setAttribute('target', originalTarget);
}
window.open = originalWindowOpen;
window.location.assign = originalAssign;
window.location.replace = originalReplace;
function log(msg) {
console.log(`[PvPRp Bypass]: ${msg}`)
}
function error(msg) {
console.error(`[PvPRp Bypass]: ${msg}`)
}