Skip to content

Commit

Permalink
sync xkit patches with v7.10.0 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Nov 25, 2024
1 parent f6f4164 commit 07cc7c5
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions Extensions/xkit_patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,29 +470,29 @@ XKit.extensions.xkit_patches = new Object({
* @returns {Promise<object>}
*/
XKit.interface.mass_edit = function(post_ids, config) {
const path = {
"add": "add_tags_to_posts",
"remove": "remove_tags_from_posts",
"delete": "delete_posts"
}[config.mode];

let payload = {
"post_ids": post_ids.join(","),
"form_key": XKit.interface.form_key()
};

if (config.mode !== "delete") {
payload.tags = config.tags.join(",");
}

return XKit.tools.Nx_XHR({
method: "POST",
url: `https://www.tumblr.com/${path}`,
headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
},
data: $.param(payload)
});
const path = {
"add": "add_tags_to_posts",
"remove": "remove_tags_from_posts",
"delete": "delete_posts"
}[config.mode];

let payload = {
"post_ids": post_ids.join(","),
"form_key": XKit.interface.form_key()
};

if (config.mode !== "delete") {
payload.tags = config.tags.join(",");
}

return XKit.tools.Nx_XHR({
method: "POST",
url: `https://www.tumblr.com/${path}`,
headers: {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
},
data: $.param(payload)
});
};

// Override "Search Page Brick Post Fix" from xkit.css
Expand Down

0 comments on commit 07cc7c5

Please sign in to comment.