first commit

This commit is contained in:
2023-01-13 13:34:44 +13:00
commit 55f30b993a
3 changed files with 44 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
This Chrome extension allows you to access goplay.anontpp.com without needing to go through reddit.
+30
View File
@@ -0,0 +1,30 @@
chrome.webRequest.onBeforeSendHeaders.addListener(function callback(details){
//console.log(JSON.stringify(details));
var headers = details.requestHeaders,
blockingResponse = {};
var newRef = "https://www.reddit.com/r/koreanvariety/comments/723mtd/i_created_this_website_that_streams_korean_shows/";
var hasRef = false;
// Each header parameter is stored in an array. Since Chrome
// makes no guarantee about the contents/order of this array,
// you'll have to iterate through it to find for the
// 'User-Agent' element
for( var i = 0, l = headers.length; i < l; ++i ) {
if( headers[i].name == 'Referer' ) {
//headers[i].value = newRef;
hasRef = true;
break;
}
// If you want to modify other headers, this is the place to
// do it. Either remove the 'break;' statement and add in more
// conditionals or use a 'switch' statement on 'headers[i].name'
}
if (!hasRef) {
headers.push({name:"Referer", value:newRef});
}
// }
blockingResponse.requestHeaders = headers;
return blockingResponse;
},
{urls: [ "https://goplay.anontpp.com/" ]},['requestHeaders','blocking']);
+13
View File
@@ -0,0 +1,13 @@
{
"manifest_version": 2,
"name": "GoPlay KDrama Reddit bypass",
"description": "Bypasses the need to have to go to reddit everytime the token dies.",
"version": "1.0",
"permissions": [
"<all_urls>","webRequest","webRequestBlocking"
],
"background": {
"scripts": ["content.js"],
"persistent": true
}
}