Add: NSFW notice
This commit is contained in:
		@@ -308,7 +308,6 @@ grid-area: toot;
 | 
			
		||||
.toot-img {
 | 
			
		||||
  object-fit: cover;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  margin-right:1px;
 | 
			
		||||
}
 | 
			
		||||
.toot img:not(.emoji-img) {
 | 
			
		||||
  max-width: 100%;
 | 
			
		||||
@@ -532,6 +531,24 @@ p:not(:last-child){
 | 
			
		||||
.jump{
 | 
			
		||||
  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 {
 | 
			
		||||
  0% {
 | 
			
		||||
    transform: translateY(0);
 | 
			
		||||
 
 | 
			
		||||
@@ -239,7 +239,7 @@ function infowebsocket(){
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			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{
 | 
			
		||||
		$("#persons").text(obj.text);
 | 
			
		||||
 
 | 
			
		||||
@@ -585,7 +585,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
 | 
			
		||||
					var sense = "sensitive"
 | 
			
		||||
					var blur=media.blurhash
 | 
			
		||||
					if(blur){
 | 
			
		||||
						nsfwmes='<span class="gray">NSFW media</span>'
 | 
			
		||||
						nsfwmes='<div class="nsfw-media">NSFW media</div>'
 | 
			
		||||
						purl=parseBlur(blur)
 | 
			
		||||
						var sense=""
 | 
			
		||||
					}
 | 
			
		||||
@@ -595,9 +595,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
 | 
			
		||||
				}
 | 
			
		||||
					viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
 | 
			
		||||
					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 +
 | 
			
		||||
					' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a>'+nsfwmes;
 | 
			
		||||
					' toot-img pointer">'+nsfwmes+'</a>';
 | 
			
		||||
				
 | 
			
		||||
			});
 | 
			
		||||
			media_ids = media_ids.slice(0, -1) ;
 | 
			
		||||
@@ -992,7 +992,6 @@ function userparse(obj, auth, acct_id, tlid, popup) {
 | 
			
		||||
function client(name) {
 | 
			
		||||
	if(name!="Unknown"){
 | 
			
		||||
	//聞く
 | 
			
		||||
	localStorage.removeItem("client_mute");
 | 
			
		||||
	var electron = require("electron");
 | 
			
		||||
	var remote=electron.remote;
 | 
			
		||||
	var dialog=remote.dialog;
 | 
			
		||||
@@ -1035,7 +1034,7 @@ function client(name) {
 | 
			
		||||
			var cli = localStorage.getItem("client_mute");
 | 
			
		||||
			var obj = JSON.parse(cli);
 | 
			
		||||
			if(!obj){
 | 
			
		||||
				var obj=[];
 | 
			
		||||
				obj=[];
 | 
			
		||||
			}
 | 
			
		||||
			obj.push(name);
 | 
			
		||||
			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-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,"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>';
 | 
			
		||||
		}else if(acct.type=="home"){
 | 
			
		||||
			var exclude='<a onclick="ebtToggle(' + key +
 | 
			
		||||
 
 | 
			
		||||
@@ -141,12 +141,13 @@ function climute(){
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
	var templete;
 | 
			
		||||
	console.log(obj)
 | 
			
		||||
	Object.keys(obj).forEach(function(key) {
 | 
			
		||||
		var cli = obj[key];
 | 
			
		||||
		var list = key * 1 + 1;
 | 
			
		||||
		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>';
 | 
			
		||||
		$("#mute-cli").append(templete);
 | 
			
		||||
	});
 | 
			
		||||
@@ -158,7 +159,7 @@ function cliMuteDel(key){
 | 
			
		||||
	obj.splice(key, 1);
 | 
			
		||||
	var json = JSON.stringify(obj);
 | 
			
		||||
	localStorage.setItem("client_mute", json);
 | 
			
		||||
	mute();
 | 
			
		||||
	climute();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function wordmute(){
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user