Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added random select button. #220

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

hadi-14
Copy link

@hadi-14 hadi-14 commented Jul 10, 2024

Added option to get random user agents from the browser.

It uses map.json to get browsers and a random os respective to the browser. then gets a random user agent from the dict.

Copy link
Owner

@ray-lothian ray-lothian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the following comments

@@ -203,7 +203,7 @@ document.getElementById('sort').addEventListener('change', e => chrome.storage.l
'popup-sort': e.target.value
}));

document.addEventListener('change', ({target}) => {
document.addEventListener('change', ({ target }) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change formatting of files.

@@ -1 +1,122 @@
[{"ua":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6 (Change: )","browser":{"name":"Arora","version":"0.6","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"Vista"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6 (Change: )","browser":{"name":"Arora","version":"0.6","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.4 (Change: )","browser":{"name":"Arora","version":"0.4","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"Vista"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.4 (Change: )","browser":{"name":"Arora","version":"0.4","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"Vista"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.2; pt-BR) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.4 (Change: )","browser":{"name":"Arora","version":"0.4","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.4 (Change: )","browser":{"name":"Arora","version":"0.4","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)","browser":{"name":"Arora","version":"0.3","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-BE) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)","browser":{"name":"Arora","version":"0.3","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)","browser":{"name":"Arora","version":"0.3","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2","browser":{"name":"Arora","version":"0.2","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"Vista"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2","browser":{"name":"Arora","version":"0.2","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2","browser":{"name":"Arora","version":"0.2","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 5.1; de-CH) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.2","browser":{"name":"Arora","version":"0.2","major":"0"},"engine":{"name":"WebKit","version":"523.15"},"os":{"name":"Windows","version":"XP"},"device":{},"cpu":{}},{"ua":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Arora/0.11.0 Safari/534.34","browser":{"name":"Arora","version":"0.11.0","major":"0"},"engine":{"name":"WebKit","version":"534.34"},"os":{"name":"Windows","version":"7"},"device":{},"cpu":{"architecture":"amd64"}},{"ua":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-MY) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.10.0","browser":{"name":"Arora","version":"0.10.0","major":"0"},"engine":{"name":"WebKit","version":"527"},"os":{"name":"Windows","version":"Vista"},"device":{},"cpu":{}}]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These JSON files are created by an script. Do not modify them.

@@ -98,11 +98,11 @@
"testUATitle": {
"message": "Test your user-agent string"
},
"considerContainers": {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removal is irrelevant to the merge request.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting was done by vscode. Also some changes may have been mistake from my side sorry for that

@@ -281,9 +281,37 @@ function msg(msg) {
toast.textContent = msg;
window.setTimeout(() => toast.textContent = '', 2000);
}
// get random elements
function getRandomElement(array) {
console.log(array);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the debugging logs.

}

// gets random browser and os
function getRandomBrowserAndOS() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The random UA, must be selected from well-known OS and browsers. Selecting a random OS breaks many websites.

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "__MSG_extensionName__",
"version": "0.6.1.1",
"version": "0.6.1.2",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change the version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants