PageSourceSearch

https://eplus.jp/s/eplus/js/plugins/smartbanner.js?date=20190626105355

js eplus.jp collected 2026-09-24 07:22:02 UTC 9,050 bytes, 5 lines download raw bytes

1/*!
2 * smartbanner.js v1.13.0 <https://github.com/ain/smartbanner.js>
3 * Copyright © 2019 Ain Tohvri, contributors. Licensed under GPL-3.0.
4 */
5!function e(t,n,i){function r(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n||e)},c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=function(){function e(){i(this,e)}return o(e,null,[{key:"getCookieExpiresString",value:function(e){var t=new Date;return"expires=".concat(new Date(t.getTime()+e).toGMTString(),";")}},{key:"bake",value:function(t,n){document.cookie="smartbanner_exited=1; ".concat(t?e.getCookieExpiresString(t):""," path=").concat(n)}},{key:"unbake",value:function(){document.cookie="smartbanner_exited=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}},{key:"baked",get:function(){return"1"===document.cookie.replace(/(?:(?:^|.*;\s*)smartbanner_exited\s*=\s*([^;]*).*$)|^.*$/,"$1")}}]),e}();n.default=a},{}],2:[function(e,t,n){(function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(){function n(){t(this,n)}return r(n,null,[{key:"platform",value:function(){return/iPhone|iPad|iPod/i.test(window.navigator.userAgent)?"ios":/Android/i.test(window.navigator.userAgent)?"android":void 0}},{key:"userAgentMatchesRegex",value:function(e){return new RegExp(e).test(window.navigator.userAgent)}},{key:"jQueryMobilePage",value:function(){return void 0!==e.$&&"undefined"!==e.$.mobile&&null!==document.querySelector(".ui-page")}},{key:"wrapperElement",value:function(){var e=n.jQueryMobilePage()?".ui-page":"html";return document.querySelectorAll(e)}}]),n}();n.default=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t,n){"use strict";var i,r=function(e){return e&&e.__esModule?e:{default:e}}(e("./smartbanner.js"));window.addEventListener("load",function(){i=new r.default,i.publish()})},{"./smartbanner.js":5}],4:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function a(e){return-1!==e.indexOf("smartbanner:")&&e.split(":")[1].length>0}function u(e){var t=e.split("-");
5return t.map(function(e,n){n>0&&(t[n]=e.charAt(0).toUpperCase()+e.substring(1))}),t.join("")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=function(){function e(){i(this,e)}return o(e,[{key:"parse",value:function(){var e=document.getElementsByTagName("meta"),t={};return Array.apply(null,e).forEach(function(e){var n=null,i=e.getAttribute("name"),r=e.getAttribute("content");i&&r&&a(i)&&r.length>0&&(n=i.split(":")[1],-1!==n.indexOf("-")&&(n=u(n)),t[n]=r)}),t}}]),e}();n.default=s},{}],5:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function u(e,t){t.exit(),e.preventDefault()}function s(e){this.positioningDisabled||f(e.data.height)}function l(e){document.querySelector(".js_smartbanner__exit").addEventListener("click",function(t){return u(t,e)}),g.default.jQueryMobilePage()&&$(document).on("pagebeforeshow",e,s)}function c(){g.default.jQueryMobilePage()&&$(document).off("pagebeforeshow",s)}function f(e){for(var t,n=g.default.wrapperElement(),i=0,r=n.length;i<r;i++)if(t=n[i],g.default.jQueryMobilePage()){if(t.getAttribute(b.originalTop))continue;var o=parseFloat(getComputedStyle(t).top);t.setAttribute(b.originalTop,isNaN(o)?0:o),t.style.top=e+"px"}else{if(t.getAttribute(b.originalMarginTop))continue;var a=parseFloat(getComputedStyle(t).marginTop);t.setAttribute(b.originalMarginTop,isNaN(a)?0:a),t.style.marginTop=e+"px"}}function d(){for(var e,t=g.default.wrapperElement(),n=0,i=t.length;n<i;n++)e=t[n],g.default.jQueryMobilePage()&&e.getAttribute(b.originalTop)?e.style.top=e.getAttribute(b.originalTop)+"px":e.getAttribute(b.originalMarginTop)&&(e.style.marginTop=e.getAttribute(b.originalMarginTop)+"px")}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var p=i(e("./optionparser.js")),g=i(e("./detector.js")),h=i(e("./bakery.js")),b={originalTop:"data-smartbanner-original-top",originalMarginTop:"data-smartbanner-original-margin-top"},m=function(){function e(){r(this,e);var t=new p.default;this.options=t.parse(),this.platform=g.default.platform()}return a(e,[{key:"publish",value:function(){if(0===Object.keys(this.options).length)throw new Error("No options detected. Please consult documentation.");if(h.default.baked)return!1;if(this.userAgentExcluded)return!1;if(!this.platformEnabled&&!this.userAgentIncluded)return!1;var e=document.createElement("div");document.querySelector("body").appendChild(e),e.outerHTML=this.html;var t=new Event("smartbanner.view");document.dispatchEvent(t),this.positioningDisabled||f(this.height),l(this)}},{key:"exit",value:function(){c(),this.positioningDisabled||d();var e=document.querySelector(".js_smartbanner");document.querySelector("body").removeChild(e);var t=new Event("smartbanner.exit");document.dispatchEvent(t),h.default.bake(this.hideTtl,this.hidePath)}},{key:"originalTop",get:function(){var e=g.default.wrapperElement()[0];return parseFloat(e.getAttribute(b.originalTop))}},{key:"originalTopMargin",get:function(){var e=g.default.wrapperElement()[0];return parseFloat(e.getAttribute(b.originalMarginTop))}},{key:"priceSuffix",get:function(){return"ios"===this.platform?this.options.priceSuffixApple:"android"===this.platform?this.options.priceSuffixGoogle:""}},{key:"icon",get:function(){return"android"===this.platform?this.options.iconGoogle:this.options.iconApple}},{key:"buttonUrl",get:function(){return"android"===this.platform?this.options.buttonUrlGoogle:"ios"===this.platform?this.options.buttonUrlApple:"#"}},{key:"html",get:function(){return'<div class="smartbanner smartbanner--'.concat(this.options.customDesignModifier?this.options.customDesignModifier:this.platform,' js_smartbanner">\n      <a href="javascript:void();" class="smartbanner__exit js_smartbanner__exit"></a>\n      <div class="smartbanner__icon" style="background-image: url(').concat(this.icon,');"></div>\n      <div class="smartbanner__info">\n        <div>\n          <div class="smartbanner__info__title">').concat(this.options.title,'</div>\n          <div class="smartbanner__info__author">').concat(this.options.author,'</div>\n          <div class="smartbanner__info__price">').concat(this.options.price).concat(this.priceSuffix,'</div>\n        </div>\n      </div>\n      <a href="').concat(this.buttonUrl,'" target="_blank" class="smartbanner__button"><span class="smartbanner__button__label">
5').concat(this.options.button,"</span></a>\n    </div>")}},{key:"height",get:function(){var e=document.querySelector(".js_smartbanner").offsetHeight;return void 0!==e?e:0}},{key:"platformEnabled",get:function(){var e=this.options.enabledPlatforms||"android,ios";return e&&-1!==e.replace(/\s+/g,"").split(",").indexOf(this.platform)}},{key:"positioningDisabled",get:function(){return"true"===this.options.disablePositioning}},{key:"userAgentExcluded",get:function(){return!!this.options.excludeUserAgentRegex&&g.default.userAgentMatchesRegex(this.options.excludeUserAgentRegex)}},{key:"userAgentIncluded",get:function(){return!!this.options.includeUserAgentRegex&&g.default.userAgentMatchesRegex(this.options.includeUserAgentRegex)}},{key:"hideTtl",get:function(){return!!this.options.hideTtl&&parseInt(this.options.hideTtl)}},{key:"hidePath",get:function(){return this.options.hidePath?this.options.hidePath:"/"}}]),e}();n.default=m},{"./bakery.js":1,"./detector.js":2,"./optionparser.js":4}]},{},[3]);

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.