espelhamento de
https://gitea.phreedom.club/localhost_frssoft/bloat.git
sincronizado 2025-07-03 00:04:19 +00:00
Partially selectable reblogs visibility (fluoride required fix)
Esse commit está contido em:
pai
a678b620a1
commit
8c41878b6d
5 arquivos alterados com 36 adições e 8 exclusões
|
@ -9,6 +9,7 @@ var reverseActions = {
|
|||
|
||||
var csrfToken = "";
|
||||
var antiDopamineMode = false;
|
||||
var retweetVisibility = "public"
|
||||
|
||||
function checkCSRFToken() {
|
||||
var tag = document.querySelector("meta[name='csrf_token']");
|
||||
|
@ -22,6 +23,12 @@ function checkAntiDopamineMode() {
|
|||
antiDopamineMode = tag.getAttribute("content") === "true";
|
||||
}
|
||||
|
||||
function checkRetweetVisibility() {
|
||||
var tag = document.querySelector("meta[name='retweet_visibility']");
|
||||
if (tag)
|
||||
retweetVisibility = tag.getAttribute("content");
|
||||
}
|
||||
|
||||
function http(method, url, body, type, success, error) {
|
||||
var req = new XMLHttpRequest();
|
||||
req.onload = function() {
|
||||
|
@ -97,7 +104,7 @@ function handleRetweetForm(id, f) {
|
|||
updateActionForm(id, forms[i], reverseActions[action]);
|
||||
}
|
||||
|
||||
var body = "csrf_token=" + encodeURIComponent(csrfToken);
|
||||
var body = "csrf_token=" + encodeURIComponent(csrfToken) + "&retweet_visibility=" + encodeURIComponent(retweetVisibility);
|
||||
var contentType = "application/x-www-form-urlencoded";
|
||||
http("POST", "/fluoride/" + action + "/" + id,
|
||||
body, contentType, function(res, type) {
|
||||
|
@ -288,6 +295,7 @@ function onPaste(e) {
|
|||
document.addEventListener("DOMContentLoaded", function() {
|
||||
checkCSRFToken();
|
||||
checkAntiDopamineMode();
|
||||
checkRetweetVisibility();
|
||||
|
||||
var statuses = document.querySelectorAll(".status-container");
|
||||
for (var i = 0; i < statuses.length; i++) {
|
||||
|
|
Carregando…
Adicionar tabela
Adicionar um link
Referência em uma nova issue