Add: always sensitive on

This commit is contained in:
Cutls 2019-10-05 03:51:05 +09:00
parent cb6a75de3b
commit 90629aecb4
4 changed files with 17 additions and 1 deletions

View File

@ -291,7 +291,12 @@ function refresh(target, loadskip) {
localStorage.setItem("user-id_" + target, json["id"]);
localStorage.setItem("prof_" + target, avatar);
localStorage.setItem("follow_" + target, json["following_count"]);
console.log(obj)
if(json["source"]["sensitive"]){
localStorage.setItem("nsfw_" + target, "true");
}else{
localStorage.removeItem("nsfw_" + target);
}
obj[target] = ref;
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
if (!loadskip) {

View File

@ -695,6 +695,11 @@ function refresh(target) {
localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]);
localStorage.setItem("prof_" + target, avatar);
if(json["source"]["sensitive"]){
localStorage.setItem("nsfw_" + target, "true");
}else{
localStorage.removeItem("nsfw_" + target);
}
obj[target] = ref;
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);

View File

@ -151,6 +151,11 @@ function media(b64, type, no) {
$("#textarea").val($("#textarea").val() + " " + json["text_url"])
}
todc();
if(localStorage.getItem("nsfw_" + acct_id)){
$("#nsfw").addClass("yellow-text");
$("#nsfw").html("visibility");
$("#nsfw").addClass("nsfw-avail");
}
$(".toot-btn-group").prop("disabled", false);
$('select').formSelect();
$("#mec").text(lang.lang_there);

View File

@ -55,6 +55,7 @@ function show() {
}
$('#post-box').fadeIn();
$('#textarea').characterCounter();
mdCheck()
}
$(function () {