mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-12 05:21:18 +00:00
experimental top trending hashtags (requires twister-core 0.9.14)
This commit is contained in:
parent
72782cea6c
commit
170ef96000
@ -136,6 +136,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- WHO TO FOLLOW MODULE END -->
|
<!-- WHO TO FOLLOW MODULE END -->
|
||||||
|
|
||||||
|
<!-- WHO TO FOLLOW MODULE INIT -->
|
||||||
|
<div class="module toptrends">
|
||||||
|
<h3>Top Trends</h3>
|
||||||
|
<ol class="toptrends-list">
|
||||||
|
<!-- use "follow-suggestion-template" here -->
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<!-- WHO TO FOLLOW MODULE END -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- LADO ESQUERDO DE MÓDULOS END -->
|
<!-- LADO ESQUERDO DE MÓDULOS END -->
|
||||||
|
@ -59,6 +59,24 @@ var InterfaceFunctions = function()
|
|||||||
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
||||||
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
||||||
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
|
||||||
|
|
||||||
|
twisterRpc("gettrendinghashtags", [10],
|
||||||
|
function(args, ret) {
|
||||||
|
for( var i = 0; i < ret.length; i++ ) {
|
||||||
|
|
||||||
|
var $li = $("<li>");
|
||||||
|
var hashtagLinkTemplate = $("#hashtag-link-template").clone(true);
|
||||||
|
hashtagLinkTemplate.removeAttr("id");
|
||||||
|
hashtagLinkTemplate.attr("href",$.MAL.hashtagUrl(ret[i]));
|
||||||
|
hashtagLinkTemplate.text("#"+ret[i]);
|
||||||
|
$li.append(hashtagLinkTemplate);
|
||||||
|
$(".toptrends-list").append($li);
|
||||||
|
}
|
||||||
|
}, {},
|
||||||
|
function(args, ret) {
|
||||||
|
console.log("Error with gettrendinghashtags. Older twister daemon?");
|
||||||
|
}, {});
|
||||||
|
|
||||||
if( args.cbFunc )
|
if( args.cbFunc )
|
||||||
args.cbFunc(args.cbArg);
|
args.cbFunc(args.cbArg);
|
||||||
}, {cbFunc:cbFunc, cbArg:cbArg});
|
}, {cbFunc:cbFunc, cbArg:cbArg});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user