PageSourceSearch

https://suniway.ph/wp-content/plugins/jeg-elementor-kit/assets/js/elements/post-pagination.js?ver=2.1.0

js suniway.ph collected 2026-10-08 17:00:01 UTC 8,761 bytes, 100 lines download raw bytes

vendor: 3,647 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap
2/******/ 	// The module cache
3/******/ 	var installedModules = {};
4/******/
5/******/ 	// The require function
6/******/ 	function __webpack_require__(moduleId) {
7/******/
8/******/ 		// Check if module is in cache
9/******/ 		if(installedModules[moduleId]) {
10/******/ 			return installedModules[moduleId].exports;
11/******/ 		}
12/******/ 		// Create a new module (and put it into the cache)
13/******/ 		var module = installedModules[moduleId] = {
14/******/ 			i: moduleId,
15/******/ 			l: false,
16/******/ 			exports: {}
17/******/ 		};
18/******/
19/******/ 		// Execute the module function
20/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ 		// Flag the module as loaded
23/******/ 		module.l = true;
24/******/
25/******/ 		// Return the exports of the module
26/******/ 		return module.exports;
27/******/ 	}
28/******/
29/******/
30/******/ 	// expose the modules object (__webpack_modules__)
31/******/ 	__webpack_require__.m = modules;
32/******/
33/******/ 	// expose the module cache
34/******/ 	__webpack_require__.c = installedModules;
35/******/
36/******/ 	// define getter function for harmony exports
37/******/ 	__webpack_require__.d = function(exports, name, getter) {
38/******/ 		if(!__webpack_require__.o(exports, name)) {
39/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ 		}
41/******/ 	};
42/******/
43/******/ 	// define __esModule on exports
44/******/ 	__webpack_require__.r = function(exports) {
45/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ 		}
48/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
49/******/ 	};
50/******/
51/******/ 	// create a fake namespace object
52/******/ 	// mode & 1: value is a module id, require it
53/******/ 	// mode & 2: merge all properties of value into the ns
54/******/ 	// mode & 4: return value when already ns object
55/******/ 	// mode & 8|1: behave like require
56/******/ 	__webpack_require__.t = function(value, mode) {
57/******/ 		if(mode & 1) value = __webpack_require__(value);
58/******/ 		if(mode & 8) return value;
59/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ 		var ns = Object.create(null);
61/******/ 		__webpack_require__.r(ns);
62/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ 		return ns;
65/******/ 	};
66/******/
67/******/ 	// getDefaultExport function for compatibility with non-harmony modules
68/******/ 	__webpack_require__.n = function(module) {
69/******/ 		var getter = module && module.__esModule ?
70/******/ 			function getDefault() { return module['default']; } :
71/******/ 			function getModuleExports() { return module; };
72/******/ 		__webpack_require__.d(getter, 'a', getter);
73/******/ 		return getter;
74/******/ 	};
75/******/
76/******/ 	// Object.prototype.hasOwnProperty.call
77/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ 	// __webpack_public_path__
80/******/ 	__webpack_require__.p = "";
81/******/
82/******/
83/******/ 	// Load entry module and return exports
84/******/ 	return __webpack_require__(__webpack_require__.s = "./jeg-elementor-kit/assets/dev/js/post-pagination.js");
85/******/ })
86/************************************************************************/
87/******/ ({
88
89/***/ "./jeg-elementor-kit/assets/dev/js/post-pagination.js":
90/*!************************************************************!*\
91  !*** ./jeg-elementor-kit/assets/dev/js/post-pagination.js ***!
92  \************************************************************/
93/*! no static exports found */
94/***/ (function(module, exports) {
95
96eval("class JKitPostPagination extends elementorModules.frontend.handlers.Base {\n  getDefaultSettings() {\n    return {\n      selectors: {\n        wrapper: '.jeg-elementor-kit.post-element',\n        pagination: '.jkit-block-pagination'\n      }\n    };\n  }\n\n  getDefaultElements() {\n    const selectors = this.getSettings('selectors');\n    return {\n      $wrapper: this.$element.find(selectors.wrapper),\n      $pagination: this.$element.find(selectors.pagination)\n    };\n  }\n\n  bindEvents() {\n    this.onInitPagination();\n  }\n\n  onInitPagination() {\n    const $this = this,\n          wrapper = $this.elements.$wrapper,\n          pagination = $this.elements.$pagination,\n          options = wrapper.data('settings'),\n          load_limit = options.pagination_scroll_limit,\n          pagination_mode = options.pagination_mode,\n          parameter = {\n      'action': jkit_element_pagination_option.element_prefix + options.class,\n      'data': {\n        'current_page': 1,\n        'attr': options\n      }\n    };\n    let lock_load = false,\n        xhr_cache = [];\n\n    const scroll_handler = function () {\n      if (!lock_load && !pagination.hasClass('disabled') && window.self == window.top) {\n        if (load_limit >= parameter.data.current_page || load_limit == '0') {\n          pagination.find('a').waypoint(function () {\n            request_ajax();\n            this.destroy();\n          }, {\n            offset: '100%',\n            context: window\n          });\n        }\n      }\n    };\n\n    const save_cache = function (parameter, response) {\n      xhr_cache.push({\n        param: JSON.stringify(parameter),\n        result: response\n      });\n    };\n\n    const get_cache = function (parameter) {\n      const jsonparam = JSON.stringify(parameter);\n\n      for (let i = 0; i < xhr_cache.length; i++) {\n        if (jsonparam === xhr_cache[i].param) {\n          return prepare_cache(xhr_cache[i].result);\n        }\n      }\n    };\n\n    const prepare_cache = function (result) {\n      result.content = '<div>' + result.content + '</div>';\n      const content = jQuery(result.content);\n      result.content = content.html();\n      return result;\n    };\n\n    const render_ajax_response = function (response) {\n      const content = jQuery(response.content);\n      let count = 0;\n      content.each(function () {\n        if (jQuery(this).hasClass('jkit-post')) {\n          jQuery(this).addClass('jkit-ajax-loaded anim-' + count);\n        }\n\n        count++;\n      });\n      wrapper.removeClass('loading');\n      wrapper.addClass('loaded');\n      wrapper.find('.jkit-ajax-flag').append(content);\n\n      if (!response.next) {\n        pagination.addClass('disabled');\n        pagination.hide();\n      }\n\n      request_after_ajax();\n      jQuery(window).trigger('resize');\n\n      if ('scrollload' === pagination_mode) {\n        setTimeout(function () {\n          scroll_handler();\n        }, 500);\n      }\n    };\n\n    const request_ajax = function () {\n      request_before_ajax();\n      parameter.data.current_page = parameter.data.current_page + 1;\n      const result = get_cache(parameter);\n\n      if (result) {\n        render_ajax_response(result);\n      } else {\n        jQuery.ajax({\n          url: jkit_ajax_url,\n          type: 'post',\n          dataType: 'json',\n          data: parameter,\n          success: function (response) {\n            render_ajax_response(response);\n            save_cache(parameter, response);\n          }\n        });\n      }\n    };\n\n    const request_before_ajax = function () {\n      lock_load = true;\n      pagination.addClass('loading');\n      pagination.find('a').text(pagination.find('a').data('loading'));\n      wrapper.addClass('loading');\n    };\n\n    const request_after_ajax = function () {\n      lock_load = false;\n      pagination.removeClass('loading');\n      pagination.find('a').text(pagination.find('a').data('load'));\n    };\n\n    if ('scrollload' === pagination_mode) {\n      scroll_handler();\n    }\n\n    pagination.find('a').on('click', function (e) {\n      e.preventDefault();\n\n      if (!lock_load && !pagination.hasClass('disabled')) {\n        request_ajax();\n      }\n    });\n  }\n\n}\n\njQuery(window).on('elementor/frontend/init', () => {\n  const addHandler = $element => {\n    elementorFrontend.elementsHandler.addHandler(JKitPostPagination, {\n      $element\n    });\n  };\n\n  elementorFrontend.hooks.addAction('frontend/element_ready/jkit_post_block.default', addHandler);\n  elementorFrontend.hooks.addAction('frontend/element_ready/jkit_post_list.default', addHandler);\n});\n\n//# sourceURL=webpack:///./jeg-elementor-kit/assets/dev/js/post-pagination.js?"
vendor: 26 bytes, lines 96-100
96);
97
98/***/ })
99
100/******/ });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.