X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=db081970116230ea028cf02525cbce26fd4c5935;hp=7c3a0645c38cc647fa3082575fb885c7e37c7a89;hb=0e692c966f8f3937b490949aa9d04b103a22b612;hpb=b64e59a2f3e9db4af19a9d15f5104722482d83bd diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 7c3a064..db08197 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1115,6 +1115,17 @@ function isIndexPage() { } /** + * Returns the current page of the selected pagination. + * + * @param paginationSelector + * The pagination selector + * @returns The current page of the pagination + */ +function getPage(paginationSelector) { + return $(".current-page", paginationSelector).text(); +} + +/** * Returns whether the current page is a “view Sone” page. * * @returns {Boolean} true if the current page is a “view Sone”