$user = common_current_user();
$action->inlineScript('var maxNoticeLength = ' . User_urlshortener_prefs::maxNoticeLength($user));
$action->inlineScript('var maxUrlLength = ' . User_urlshortener_prefs::maxUrlLength($user));
- $action->script('plugins/ClientSideShorten/shorten.js');
+ $action->script($this->path('shorten.js'));
}
}
class InfiniteScrollPlugin extends Plugin
{
+
+ public $on_next_only = false;
+
function __construct()
{
parent::__construct();
function onEndShowScripts($action)
{
$action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';');
+ $action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";');
$action->script($this->path('jquery.infinitescroll.js'));
$action->script($this->path('infinitescroll.js'));
}
'body#showfavorites li.nav_next a,'+
'body#showgroup li.nav_next a,'+
'body#favorited li.nav_next a',
- loadingImg : $('address .url')[0].href+'plugins/InfiniteScroll/ajax-loader.gif',
+ loadingImg : ajax_loader_url,
text : "<em>Loading the next set of posts...</em>",
donetext : "<em>Congratulations, you\'ve reached the end of the Internet.</em>",
navSelector : "#pagination",