Select Git revision
firebase.dart
-
Madlen Ort authoredMadlen Ort authored
backtotop.min.js.map 3.69 KiB
{"version":3,"sources":["../src/backtotop.js"],"names":["define","$","str","Notification","initBackToTop","stringsPromise","get_string","when","then","string","after","window","scroll","document","scrollTop","fadeIn","fadeOut","click","event","preventDefault","animate","fail","exception","init"],"mappings":"AAuBAA,OAAM,gCAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,mBAAvB,CAAD,CAA8C,SAASC,CAAT,CAAYC,CAAZ,CAAiBC,CAAjB,CAA+B,CAC/E,aAKA,QAASC,CAAAA,CAAT,EAAyB,CAErB,GAAIC,CAAAA,CAAc,CAAGH,CAAG,CAACI,UAAJ,CAAe,WAAf,CAA4B,oBAA5B,CAArB,CAGAL,CAAC,CAACM,IAAF,CAAOF,CAAP,EAAuBG,IAAvB,CAA4B,SAASC,CAAT,CAAiB,CAEzCR,CAAC,CAAC,cAAD,CAAD,CAAkBS,KAAlB,CAAwB,mFACcD,CADd,CACuB,SAD/C,EAKAR,CAAC,CAACU,MAAD,CAAD,CAAUC,MAAV,CAAiB,UAAW,CACxB,GAA8B,GAA1B,CAAAX,CAAC,CAACY,QAAD,CAAD,CAAYC,SAAZ,EAAJ,CAAmC,CAC/Bb,CAAC,CAAC,cAAD,CAAD,CAAkBc,MAAlB,CAAyB,GAAzB,CACH,CAFD,IAEO,CACHd,CAAC,CAAC,cAAD,CAAD,CAAkBe,OAAlB,CAA0B,GAA1B,CACH,CACJ,CAND,EASAf,CAAC,CAAC,cAAD,CAAD,CAAkBgB,KAAlB,CAAwB,SAASC,CAAT,CAAgB,CACpCA,CAAK,CAACC,cAAN,GACAlB,CAAC,CAAC,YAAD,CAAD,CAAgBmB,OAAhB,CAAwB,CAACN,SAAS,CAAE,CAAZ,CAAxB,CAAwC,GAAxC,CACH,CAHD,EAKA,QACH,CAtBD,EAsBGO,IAtBH,CAsBQlB,CAAY,CAACmB,SAtBrB,CAuBH,CAED,MAAO,CACHC,IAAI,CAAE,eAAW,CACbnB,CAAa,EAChB,CAHE,CAKV,CAzCK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Theme Boost Campus - JS code back to top button\n *\n * @package theme_boost_campus\n * @copyright 2017 Kathrin Osswald, Ulm University <kathrin.osswald@uni-ulm.de>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\ndefine(['jquery', 'core/str', 'core/notification'], function($, str, Notification) {\n \"use strict\";\n\n /**\n * Initialising.\n */\n function initBackToTop() {\n // Get the string backtotop from language file.\n var stringsPromise = str.get_string('backtotop', 'theme_boost_campus');\n\n // Add backtotop button to DOM and add scroll and click handlers.\n $.when(stringsPromise).then(function(string) {\n // Add a fontawesome icon after the footer as the back to top button.\n $('#page-footer').after('<i class=\"fa fa-chevron-up fa-2x d-print-none\"' +\n 'id=\"back-to-top\" aria-label=\"' + string + '\"></i>');\n\n // This function fades the button in when the page is scrolled down or fades it out\n // if the user is at the top of the page.\n $(window).scroll(function() {\n if ($(document).scrollTop() > 220) {\n $('#back-to-top').fadeIn(300);\n } else {\n $('#back-to-top').fadeOut(100);\n }\n });\n\n // This function scrolls the page to top with a duration of 500ms.\n $('#back-to-top').click(function(event) {\n event.preventDefault();\n $('html, body').animate({scrollTop: 0}, 500);\n });\n\n return true;\n }).fail(Notification.exception);\n }\n\n return {\n init: function() {\n initBackToTop();\n }\n };\n});\n"],"file":"backtotop.min.js"}