diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index c0cb80bf..d5684bb0 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -320,5 +320,17 @@
},
"statusReminder": {
"message": "Check status.sponsor.ajay.app for server status."
+ },
+ "changeUserID": {
+ "message": "Import/Export Your UserID"
+ },
+ "whatChangeUserID": {
+ "message": "This should be kept private. This is like a password and should not be shared with anyone. If someone has this, they can impersonate you."
+ },
+ "setUserID": {
+ "message": "Set UserID"
+ },
+ "userIDChangeWarning": {
+ "message": "Warning: Changing the UserID is permanent. Are you sure you would like to do this? Make sure to backup your old one just in case."
}
}
diff --git a/background.js b/background.js
index ae1f7e45..f2759f1f 100644
--- a/background.js
+++ b/background.js
@@ -109,7 +109,7 @@ function submitVote(type, UUID, callback) {
}
//publish this vote
- sendRequestToServer("GET", "/api/voteOnSponsorTime?UUID=" + UUID + "&userID=" + userID + "&type=" + type, function(xmlhttp, error) {
+ sendRequestToServer("POST", "/api/voteOnSponsorTime?UUID=" + UUID + "&userID=" + userID + "&type=" + type, function(xmlhttp, error) {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
callback({
successType: 1
diff --git a/content.js b/content.js
index 55f2a3ca..0a829e51 100644
--- a/content.js
+++ b/content.js
@@ -498,12 +498,11 @@ function updatePreviewBar() {
function getChannelID() {
//get channel id
- let channelNameContainer = document.getElementById("channel-name");
-
let channelURLContainer = null;
- if (channelNameContainer !== null) {
- channelURLContainer = channelNameContainer.querySelector("#container").querySelector("#text-container").querySelector("#text").firstElementChild;
+ channelURLContainer = document.querySelector("#channel-name > #container > #text-container > #text");
+ if (channelURLContainer !== null) {
+ channelURLContainer = channelURLContainer.firstElementChild;
} else {
//old YouTube theme
let channelContainers = document.getElementsByClassName("yt-user-info");
@@ -652,9 +651,9 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
}
}
- //send telemetry that a this sponsor was skipped happened
+ //send telemetry that a this sponsor was skipped
if (trackViewCount && !sponsorSkipped[index]) {
- sendRequestToServer("GET", "/api/viewedVideoSponsorTime?UUID=" + currentUUID);
+ sendRequestToServer("POST", "/api/viewedVideoSponsorTime?UUID=" + currentUUID);
if (!disableAutoSkip) {
// Count this as a skip
@@ -941,11 +940,13 @@ function vote(type, UUID, skipNotice) {
let sponsorIndex = UUIDs.indexOf(UUID);
- // See if the local time saved count and skip count should be reverted
+ // See if the local time saved count and skip count should be saved
if (type == 0 && sponsorSkipped[sponsorIndex] || type == 1 && !sponsorSkipped[sponsorIndex]) {
let factor = 1;
if (type == 0) {
factor = -1;
+
+ sponsorSkipped[sponsorIndex] = false;
}
// Count this as a skip
@@ -959,8 +960,6 @@ function vote(type, UUID, skipNotice) {
chrome.storage.sync.set({"skipCount": result.skipCount + factor * 1 });
});
-
- sponsorSkipped[sponsorIndex] = !sponsorSkipped[sponsorIndex];
}
chrome.runtime.sendMessage({
diff --git a/manifest.json b/manifest.json
index 8b1e6e64..611376a4 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "__MSG_Name__",
- "version": "1.2.1",
+ "version": "1.2.2",
"default_locale": "en",
"description": "__MSG_Description__",
"content_scripts": [
diff --git a/popup.html b/popup.html
index a9130680..dffd393d 100644
--- a/popup.html
+++ b/popup.html
@@ -253,6 +253,28 @@
+
+
+
+
+ __MSG_whatChangeUserID__
+
+
+