X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FInfiniteScroll%2FInfiniteScrollPlugin.php;h=5928c007fe1a3991f8fa64290bace4c496329c2b;hb=1ccfb5d9d34128005bc10d89e3ed56ff0e643969;hp=6738dc7608755c99792b8afc6681660561824d33;hpb=d77982b9b47b8b17051000cfcf3db1a8945d6279;p=quix0rs-gnu-social.git diff --git a/plugins/InfiniteScroll/InfiniteScrollPlugin.php b/plugins/InfiniteScroll/InfiniteScrollPlugin.php index 6738dc7608..5928c007fe 100644 --- a/plugins/InfiniteScroll/InfiniteScrollPlugin.php +++ b/plugins/InfiniteScroll/InfiniteScrollPlugin.php @@ -1,6 +1,6 @@ . * * @category Plugin - * @package Laconica + * @package StatusNet * @author Craig Andrews * @copyright 2009 Craig Andrews http://candrews.integralblue.com * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -40,27 +40,7 @@ class InfiniteScrollPlugin extends Plugin function onEndShowScripts($action) { - $action->element('script', - array('type' => 'text/javascript', - 'src' => common_path('plugins/InfiniteScroll/jquery.infinitescroll.min.js')), - ''); - - $loading_image = common_path('plugins/InfiniteScroll/ajax-loader.gif'); - $js_string = << -jQuery(document).ready(function($){ - $('notices_primary').infinitescroll({ - nextSelector : "li.nav_next a", - loadingImg : "$loading_image", - text : "Loading the next set of posts...", - donetext : "Congratulations, you\'ve reached the end of the Internet.", - navSelector : "div.pagination", - contentSelector : "#notices_primary", - itemSelector : "ol.notices" - }); -}); - -EOT; - $action->raw($js_string); + $action->script('plugins/InfiniteScroll/jquery.infinitescroll.js'); + $action->script('plugins/InfiniteScroll/infinitescroll.js'); } }