Add: NSFW notice
This commit is contained in:
parent
873a8fd229
commit
8991cb5a96
|
@ -308,7 +308,6 @@ grid-area: toot;
|
||||||
.toot-img {
|
.toot-img {
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-right:1px;
|
|
||||||
}
|
}
|
||||||
.toot img:not(.emoji-img) {
|
.toot img:not(.emoji-img) {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
@ -532,6 +531,24 @@ p:not(:last-child){
|
||||||
.jump{
|
.jump{
|
||||||
display: inline-block; animation: jump 0.75s linear infinite;
|
display: inline-block; animation: jump 0.75s linear infinite;
|
||||||
}
|
}
|
||||||
|
.img-link{
|
||||||
|
position:relative;
|
||||||
|
display:block;
|
||||||
|
margin-right:1px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.nsfw-media{
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
right:0;
|
||||||
|
background-color: black;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
.img-link img{
|
||||||
|
display:block;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
@keyframes jump {
|
@keyframes jump {
|
||||||
0% {
|
0% {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
|
|
|
@ -239,7 +239,7 @@ function infowebsocket(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(show){
|
if(show){
|
||||||
Materialize.toast(escapeHTML(obj.Text)+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
|
Materialize.toast(escapeHTML(obj.text)+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$("#persons").text(obj.text);
|
$("#persons").text(obj.text);
|
||||||
|
|
|
@ -585,7 +585,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
var sense = "sensitive"
|
var sense = "sensitive"
|
||||||
var blur=media.blurhash
|
var blur=media.blurhash
|
||||||
if(blur){
|
if(blur){
|
||||||
nsfwmes='<span class="gray">NSFW media</span>'
|
nsfwmes='<div class="nsfw-media">NSFW media</div>'
|
||||||
purl=parseBlur(blur)
|
purl=parseBlur(blur)
|
||||||
var sense=""
|
var sense=""
|
||||||
}
|
}
|
||||||
|
@ -595,9 +595,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
}
|
}
|
||||||
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
|
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
|
||||||
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
||||||
'" data-type="' + media.type + '" class="img-parsed"><img draggable="false" src="' +
|
'" data-type="' + media.type + '" class="img-parsed img-link" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"><img draggable="false" src="' +
|
||||||
purl + '" class="' + sense +
|
purl + '" class="' + sense +
|
||||||
' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a>'+nsfwmes;
|
' toot-img pointer">'+nsfwmes+'</a>';
|
||||||
|
|
||||||
});
|
});
|
||||||
media_ids = media_ids.slice(0, -1) ;
|
media_ids = media_ids.slice(0, -1) ;
|
||||||
|
@ -992,7 +992,6 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
function client(name) {
|
function client(name) {
|
||||||
if(name!="Unknown"){
|
if(name!="Unknown"){
|
||||||
//聞く
|
//聞く
|
||||||
localStorage.removeItem("client_mute");
|
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var remote=electron.remote;
|
var remote=electron.remote;
|
||||||
var dialog=remote.dialog;
|
var dialog=remote.dialog;
|
||||||
|
@ -1035,7 +1034,7 @@ function client(name) {
|
||||||
var cli = localStorage.getItem("client_mute");
|
var cli = localStorage.getItem("client_mute");
|
||||||
var obj = JSON.parse(cli);
|
var obj = JSON.parse(cli);
|
||||||
if(!obj){
|
if(!obj){
|
||||||
var obj=[];
|
obj=[];
|
||||||
}
|
}
|
||||||
obj.push(name);
|
obj.push(name);
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
|
|
|
@ -160,7 +160,7 @@ function parseColumn() {
|
||||||
'<input type="checkbox" class="filled-in" id="exc-fav-'+key+'" '+excludeCk(key,"favourite")+' /><label for="exc-fav-'+key+'" class="exc-chb"><i class="fas fa-star exc-icons"></i></label> '+
|
'<input type="checkbox" class="filled-in" id="exc-fav-'+key+'" '+excludeCk(key,"favourite")+' /><label for="exc-fav-'+key+'" class="exc-chb"><i class="fas fa-star exc-icons"></i></label> '+
|
||||||
'<input type="checkbox" class="filled-in" id="exc-bt-'+key+'" '+excludeCk(key,"reblog")+' /><label for="exc-bt-'+key+'" class="exc-chb" ><i class="fas fa-retweet exc-icons"></i></label> '+
|
'<input type="checkbox" class="filled-in" id="exc-bt-'+key+'" '+excludeCk(key,"reblog")+' /><label for="exc-bt-'+key+'" class="exc-chb" ><i class="fas fa-retweet exc-icons"></i></label> '+
|
||||||
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"follow")+' /><label for="exc-follow-'+key+'" class="exc-chb" ><i class="fas fa-users exc-icons"></i></label> '+
|
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"follow")+' /><label for="exc-follow-'+key+'" class="exc-chb" ><i class="fas fa-users exc-icons"></i></label> '+
|
||||||
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"poll")+' /><label for="exc-poll-'+key+'" class="exc-chb" ><i class="fas fa-tasks exc-icons"></i></label> '+
|
'<input type="checkbox" class="filled-in" id="exc-poll-'+key+'" '+excludeCk(key,"poll")+' /><label for="exc-poll-'+key+'" class="exc-chb" ><i class="fas fa-tasks exc-icons"></i></label> '+
|
||||||
'<button class="btn waves-effect" style="width:60px; padding:0;" onclick="exclude('+key+')">Filter</button><br>';
|
'<button class="btn waves-effect" style="width:60px; padding:0;" onclick="exclude('+key+')">Filter</button><br>';
|
||||||
}else if(acct.type=="home"){
|
}else if(acct.type=="home"){
|
||||||
var exclude='<a onclick="ebtToggle(' + key +
|
var exclude='<a onclick="ebtToggle(' + key +
|
||||||
|
|
|
@ -141,12 +141,13 @@ function climute(){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var templete;
|
var templete;
|
||||||
|
console.log(obj)
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var cli = obj[key];
|
var cli = obj[key];
|
||||||
var list = key * 1 + 1;
|
var list = key * 1 + 1;
|
||||||
templete = '<div class="acct" id="acct_' + key + '">' + list +
|
templete = '<div class="acct" id="acct_' + key + '">' + list +
|
||||||
'.' +
|
'.' +
|
||||||
cli + '<button class="btn waves-effect red disTar" onclick="cliMuteDel(' +
|
escapeHTML(cli) + '<button class="btn waves-effect red disTar" onclick="cliMuteDel(' +
|
||||||
key + ')">'+lang.lang_del+'</button><br></div>';
|
key + ')">'+lang.lang_del+'</button><br></div>';
|
||||||
$("#mute-cli").append(templete);
|
$("#mute-cli").append(templete);
|
||||||
});
|
});
|
||||||
|
@ -158,7 +159,7 @@ function cliMuteDel(key){
|
||||||
obj.splice(key, 1);
|
obj.splice(key, 1);
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("client_mute", json);
|
localStorage.setItem("client_mute", json);
|
||||||
mute();
|
climute();
|
||||||
}
|
}
|
||||||
|
|
||||||
function wordmute(){
|
function wordmute(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user