forked from lubuwest/Friendiqa
v0.5.1
This commit is contained in:
parent
01e9ae06f4
commit
7119d5bdf4
292 changed files with 790 additions and 16347 deletions
|
@ -56,7 +56,7 @@ else{
|
|||
var forumname="";
|
||||
try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_author')&&
|
||||
((newsitemobject.friendica_author.url)!=(newsitemobject.user.url))&&((newsitemobject.friendica_author.url)!=null)){
|
||||
print(" Friendica Author "+JSON.stringify(newsitemobject.friendica_author));
|
||||
//print(" Friendica Author "+JSON.stringify(newsitemobject));
|
||||
forumname=" via "+newsitemobject.user.name;
|
||||
newsitemobject.user=newsitemobject.friendica_author;
|
||||
}}catch(e){print("forum name "+e)}
|
||||
|
@ -138,20 +138,21 @@ else{
|
|||
if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)}
|
||||
}
|
||||
}
|
||||
// if (newsitemobject.text.indexOf("https://www.youtube.com/watch")>-1){
|
||||
// //print("message "+msg.options.showWebsiteForLinks);
|
||||
// if (msg.options.showYoutube!="false"){
|
||||
// var ythelper={mimetype:"video/youtube"}
|
||||
// var yttext=newsitemobject.text;
|
||||
// while (yttext.indexOf("https://www.youtube.com/watch")>-1){
|
||||
// var ythelperstringposition=linktext.indexOf("watch?v=");
|
||||
// var ytposend=findend(yttext,ythelperstringposition);
|
||||
// ythelper.url=yttext.substring(yttext.lastIndexOf("http",linkhelperstringposition),linkposend);
|
||||
// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
|
||||
// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (newsitemobject.text.indexOf("youtube.com/watch?v")>-1){
|
||||
//print("message "+msg.options.showWebsiteForLinks);
|
||||
//if (msg.options.showYoutube!="false"){
|
||||
|
||||
var yttext=newsitemobject.text;
|
||||
while (yttext.indexOf("youtube.com/watch?v")>-1){
|
||||
var ythelperstringposition=yttext.indexOf("watch?v=");
|
||||
var ytposend=findend(yttext,ythelperstringposition);
|
||||
var ythelper={mimetype:"video/youtube"}
|
||||
ythelper.url=yttext.substring(ythelperstringposition+8,ytposend);
|
||||
yttext=yttext.substring(ytposend,yttext.length);
|
||||
if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ythelper.url)){attachmentList.push(ythelper)}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
// if (newsitemobject.text.indexOf(".html")>-1){
|
||||
// //print("message "+msg.options.showWebsiteForLinks);
|
||||
|
@ -169,6 +170,11 @@ else{
|
|||
// }
|
||||
|
||||
newsitemobject.attachmentList=attachmentList;
|
||||
|
||||
if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){
|
||||
newsitemobject.nsfw=true
|
||||
} else{newsitemobject.nsfw=false}
|
||||
|
||||
var seconds=(msg.currentTime-newsitemobject.created_at)/1000;
|
||||
var timestring="";
|
||||
if (seconds<60) {timestring=seconds+" "+qsTr("seconds") +" "+qsTr("ago");}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue