This commit is contained in:
Cutls 2019-04-14 01:42:18 +09:00
parent 4e5fe2fc91
commit cec46faf19
8 changed files with 27 additions and 10 deletions

View File

@ -35,8 +35,11 @@
}else if(tags){
if(tags[2]){
tagShow(tags[2]);
Materialize.toast('<a class="btn-flat toast-action" href="detEx(\''+url+'\')">Open in browser</a>', 86400);
var acct_id=$a.parent().attr("data-acct");
if(!acct_id){
acct_id=0;
}
tl('tag',decodeURI(tags[2]),acct_id,'add')
}
}else if(ats){
console.log(ats);

View File

@ -32,6 +32,13 @@ function nl2br(str) {
str = str.replace(/(\n|\r)/g, "<br />");
return str;
}
function br2nl(str) {
if(!str){
return "";
}
str = str.replace(/<br \/>/g, "\r\n");
return str;
}
function formattime(date){
var str=date.getFullYear()+"-";
if(date.getMonth()+1<10){

View File

@ -4,9 +4,9 @@ function additional(acct_id, tlid) {
//メンション系
//$(".mention").attr("href", "");
$(".mention").addClass("parsed");
$("#timeline-container .mention").addClass("parsed");
$(".hashtag").each(function(i, elem) {
$("#timeline-container .hashtag").each(function(i, elem) {
var tags = $(this).attr("href").match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
@ -17,8 +17,6 @@ function additional(acct_id, tlid) {
}
}
});
//トゥートサムネ
@ -34,6 +32,7 @@ function additional(acct_id, tlid) {
);
}
}else{
text=""
var urls =[]
}

View File

@ -105,6 +105,7 @@ function udg(user, acct_id) {
fer(json.id, '', acct_id);
var dis_name=escapeHTML(json.display_name);
dis_name=twemoji.parse(dis_name);
var note=json.note;
if(json.emojis){
var actemojick = json.emojis[0];
@ -123,6 +124,12 @@ function udg(user, acct_id) {
note = note.replace(regExp, emoji_url);
});
}
//noteの解析
//var tags = '<a onclick="tl(\'tag\',\'$1\',' + acct_id +',\'add\')" class="pointer parsed">#$1</a>';
//var mens = '<a onclick="udgEx(\'$1\',' + acct_id +')" class="pointer parsed">@$1</a>';
//note=note.replace(/#(\S+)/gi, tags)
console.log(note)
//note=note.replace(/\s@([a-zA-Z_0-9@.-]+)/gi, mens)
$("#his-name").html(dis_name);
$("#his-acct").text(json.acct);
$("#his-acct").attr("fullname",fullname);
@ -164,6 +171,7 @@ function udg(user, acct_id) {
if(json.bot){
$("#his-bot").html(lang.lang_showontl_botacct);
}
$("#his-des").attr("data-acct",acct_id);
$('#his-data').css('background-size', 'cover');
$("#his-data .tab-content").css("height",$("#his-float-timeline").height()-70+"px")
localStorage.setItem("history" , user);

View File

@ -385,7 +385,7 @@ var tlid=0;
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">Emphasize this user</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">Feature on profile</a><br>

View File

@ -385,7 +385,7 @@ var tlid=0;
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">ユーザー強調</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">紹介する</a><br>

View File

@ -385,7 +385,7 @@ var tlid=0;
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">{{empUser}}</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">{{endorse}}</a><br>

View File

@ -385,7 +385,7 @@ var tlid=0;
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">crwdns472:0crwdne472:0</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">crwdns454:0crwdne454:0</a><br>