-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* delete incognito mode * add auto download UblockOrigin
- Loading branch information
Showing
369 changed files
with
559 additions
and
338,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
keywords: ["mr beast", "pass"], | ||
comments: ["hello","let's be a friend","subs to subs ahaha"], | ||
usernamegoogle: "username_google/email_google", | ||
passwordgoogle: "password_google", | ||
trending: false, // set true if you want comment on trending videos or false if you want comment on search videos | ||
newVideos: false, // set true if you want comment on new videos or false if you want comment on top videos | ||
copycomment:true, // set tru if you want copy comment from array or false if you want random comment | ||
userdatadir : "fdciabdul", // set your userdatadir | ||
ai : false, //set true if you want use ai comment or false if you want use random comment or copy comment | ||
apiKey : "", // set your api key from | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
|
||
[1:36:32 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=6x_b11Kyrco&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:05:34 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=kX3nB4PpJko&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:05:50 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=vBpQ1SlfVtU&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:06:06 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=NigrQ9UcJy4&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:06:20 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=HBMmK1c44sE&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:06:35 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=Ooke4YZv8Ts&pp=ygUIbXIgYmVhc3Q%3D | Status: success | ||
[2:06:52 PM] | User: chanmenme2 | Link: https://www.youtube.com/watch?v=d1010B3sKNQ&pp=ygUIbXIgYmVhc3Q%3D | Status: success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
const axios = require('axios'); | ||
const fs = require('fs'); | ||
const zl = require("zip-lib"); | ||
const fsExtra = require('fs-extra'); | ||
const path = require('path'); | ||
|
||
async function uBlockOriginDownloader() { | ||
const releasesUrl = 'https://api.github.com/repos/gorhill/uBlock/releases/latest'; | ||
try { | ||
const response = await axios.get(releasesUrl); | ||
const assets = response.data.assets; | ||
if (assets && assets.length > 0) { | ||
const downloadUrl = assets[0].browser_download_url; | ||
const fileName = assets[0].name; | ||
logInfo(`Downloading ${fileName} ...`); | ||
const downloadResponse = await axios.get(downloadUrl, { | ||
responseType: 'stream' | ||
}); | ||
|
||
const writer = fs.createWriteStream(fileName); | ||
|
||
const downloadPromise = new Promise((resolve, reject) => { | ||
downloadResponse.data.pipe(writer); | ||
writer.on('finish', async () => { | ||
logSuccess(`Downloaded ${fileName} successfully!`); | ||
const unzip = await unzipFile(fileName); | ||
resolve(unzip); | ||
}); | ||
writer.on('error', (error) => { | ||
logError(`Error writing file: ${error}`); | ||
reject(false); | ||
}); | ||
}); | ||
|
||
return await downloadPromise; | ||
} else { | ||
logError('No assets found for the latest release.'); | ||
return false; | ||
} | ||
} catch (error) { | ||
logError(`Failed to fetch the latest release: ${error.message}`); | ||
return false; | ||
} | ||
} | ||
|
||
async function unzipFile(filePath) { | ||
const tempDir = './temp_unzipped_content'; | ||
|
||
const unzip = new zl.Unzip({ | ||
onEntry: function (event) { | ||
logInfo(`Extracting ${event.entryCount}: ${event.entryName}`); | ||
} | ||
}); | ||
|
||
try { | ||
await unzip.extract(filePath, tempDir); | ||
logSuccess('File unzipped to temporary location!'); | ||
const subdirs = fs.readdirSync(tempDir).filter(subdir => fs.statSync(path.join(tempDir, subdir)).isDirectory()); | ||
if (subdirs.length > 0) { | ||
const mainSubdir = path.join(tempDir, subdirs[0]); | ||
const finalDir = './ublock'; | ||
|
||
// Remove the final directory if it exists | ||
if (fs.existsSync(finalDir)) { | ||
fsExtra.removeSync(finalDir); | ||
} | ||
|
||
// Move the content from the main subdirectory to the final directory | ||
await fsExtra.move(mainSubdir, finalDir); | ||
fsExtra.removeSync(tempDir); | ||
logSuccess('Content moved to final location!'); | ||
return true; | ||
} else { | ||
logError('No subdirectories found. Content remains in the temporary location.'); | ||
return false; | ||
} | ||
} catch (err) { | ||
logError(`Error during unzip or move operation: ${err.message}`); | ||
return false; | ||
} | ||
} | ||
|
||
|
||
function logInfo(message) { | ||
console.log('\x1b[34m%s\x1b[0m', message); // Blue for info messages | ||
} | ||
|
||
function logSuccess(message) { | ||
console.log('\x1b[32m%s\x1b[0m', message); // Green for success messages | ||
} | ||
|
||
function logError(message) { | ||
console.error('\x1b[31m%s\x1b[0m', message); // Red for error messages | ||
} | ||
|
||
|
||
module.exports = { | ||
uBlockOriginDownloader | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.