Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:"✓";margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}/*# sourceMappingURL=affiliation.css.map */
|
@@ -0,0 +1 @@
|
||||
@media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}/*# sourceMappingURL=checkout.css.map */
|
@@ -0,0 +1 @@
|
||||
.fs-notice[data-id^=clone_resolution_options_notice]{padding:0;color:inherit !important}.fs-notice[data-id^=clone_resolution_options_notice] .fs-notice-body{padding:0;margin-bottom:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-notice-header{padding:5px 10px}.fs-notice[data-id^=clone_resolution_options_notice] ol{margin-top:0;margin-bottom:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-options-container{display:flex;flex-direction:row;padding:0 10px 10px}@media(max-width: 750px){.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-options-container{flex-direction:column}}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option{border:1px solid #ccc;padding:10px 10px 15px 10px;flex:auto;margin:5px}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option:first-child{margin-left:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option:last-child{margin-right:0}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-resolution-option strong{font-size:1.2em;padding:2px;line-height:1.5em}.fs-notice[data-id^=clone_resolution_options_notice] a{text-decoration:none}.fs-notice[data-id^=clone_resolution_options_notice] .button{margin-right:10px}.rtl .fs-notice[data-id^=clone_resolution_options_notice] .button{margin-right:0;margin-left:10px}.fs-notice[data-id^=clone_resolution_options_notice] .fs-clone-documentation-container{padding:0 10px 15px}.fs-notice[data-id=temporary_duplicate_notice] #fs_clone_resolution_error_message{border:1px solid #d3135a;background:#fee;color:#d3135a;padding:10px}.fs-notice[data-id=temporary_duplicate_notice] ol{margin-top:0}.fs-notice[data-id=temporary_duplicate_notice] a{position:relative}.fs-notice[data-id=temporary_duplicate_notice] a:focus{box-shadow:none}.fs-notice[data-id=temporary_duplicate_notice] a.disabled{color:gray}.fs-notice[data-id=temporary_duplicate_notice] a .fs-ajax-spinner{position:absolute;left:8px;right:0;top:-1px;bottom:0;margin-left:100%}/*# sourceMappingURL=clone-resolution.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}/*# sourceMappingURL=debug.css.map */
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.fs-notice[data-id^=gdpr_optin_actions] .underlined{text-decoration:underline}.fs-notice[data-id^=gdpr_optin_actions] ul .button,.fs-notice[data-id^=gdpr_optin_actions] ul .action-description{vertical-align:middle}.fs-notice[data-id^=gdpr_optin_actions] ul .action-description{display:inline-block;margin-left:3px}/*# sourceMappingURL=gdpr-optin-notice.css.map */
|
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
// Hide file structure from users on unprotected servers.
|
@@ -0,0 +1 @@
|
||||
.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .dashicons{float:none !important}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:rgba(0,0,0,.8);color:#fff !important;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,.8) rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}.fs-permissions .fs-permission.fs-disabled{color:#aaa}.fs-permissions .fs-permission.fs-disabled .fs-permission-description span{color:#aaa}.fs-permissions .fs-permission .fs-switch-feedback{position:absolute;right:15px;top:52px}.fs-permissions ul{height:0;overflow:hidden;margin:0}.fs-permissions ul li{padding:17px 15px;margin:0;position:relative}.fs-permissions ul li>i.dashicons{float:left;font-size:30px;width:30px;height:30px;padding:5px}.fs-permissions ul li .fs-switch{float:right}.fs-permissions ul li .fs-permission-description{margin-left:55px}.fs-permissions ul li .fs-permission-description span{font-size:14px;font-weight:500;color:#23282d}.fs-permissions ul li .fs-permission-description .fs-tooltip{font-size:13px;font-weight:bold}.fs-permissions ul li .fs-permission-description .fs-tooltip-trigger .dashicons{margin:-1px 2px 0 2px}.fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}.fs-permissions.fs-open{background:#fff}.fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 0 10px 0}.fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-right:10px}.fs-permissions .fs-switch-feedback.success{color:#71ae00}.rtl .fs-permissions .fs-switch-feedback{right:auto;left:15px}.rtl .fs-permissions .fs-switch-feedback .fs-ajax-spinner{margin-left:10px;margin-right:0}.rtl .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl .fs-permissions ul li .fs-switch{float:left}.rtl .fs-permissions ul li i.dashicons{float:right}.fs-modal-opt-out .fs-modal-footer .fs-opt-out-button{line-height:30px;margin-right:10px}.fs-modal-opt-out .fs-permissions{margin-top:0 !important}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-group-opt-out-button{float:right;line-height:1.1em}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-switch-feedback{float:right;line-height:1.1em;margin-right:10px}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header .fs-switch-feedback .fs-ajax-spinner{margin:-2px 0 0}.fs-modal-opt-out .fs-permissions .fs-permissions-section--header-title{font-size:1.1em;font-weight:600;text-transform:uppercase;display:block;line-height:1.1em;margin:.5em 0}.fs-modal-opt-out .fs-permissions .fs-permissions-section--desc{margin-top:0}.fs-modal-opt-out .fs-permissions hr{border:0;border-top:#eee solid 1px;margin:25px 0 20px 0}.fs-modal-opt-out .fs-permissions ul{border:1px solid #c3c4c7;border-radius:3px;margin:10px 0 0 0;box-shadow:0 1px 1px rgba(0,0,0,.04)}.fs-modal-opt-out .fs-permissions ul li{border-bottom:1px solid #d7dde1;border-left:4px solid #72aee6}.rtl .fs-modal-opt-out .fs-permissions ul li{border-left:none;border-right:4px solid #72aee6}.fs-modal-opt-out .fs-permissions ul li.fs-disabled{border-left-color:rgba(114,174,230,0)}.fs-modal-opt-out .fs-permissions ul li:last-child{border-bottom:none}/*# sourceMappingURL=optout.css.map */
|
@@ -0,0 +1 @@
|
||||
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}/*# sourceMappingURL=plugins.css.map */
|
@@ -0,0 +1 @@
|
||||
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-ms-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:"arial",serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,.2);box-shadow:1px 1px 1px rgba(0,0,0,.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:" ";display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out,.15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}/*# sourceMappingURL=customizer.css.map */
|
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
// Hide file structure from users on unprotected servers.
|
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
// Hide file structure from users on unprotected servers.
|
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
// Hide file structure from users on unprotected servers.
|
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
// Hide file structure from users on unprotected servers.
|
@@ -0,0 +1,140 @@
|
||||
/*!
|
||||
* jQuery postMessage - v0.5 - 9/11/2009
|
||||
* http://benalman.com/projects/jquery-postmessage-plugin/
|
||||
*
|
||||
* Copyright (c) 2009 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*
|
||||
* Non-jQuery fork by Jeff Lee
|
||||
*
|
||||
* This fork consists of the following changes:
|
||||
* 1. Basic code cleanup and restructuring, for legibility.
|
||||
* 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
|
||||
* in terms of both function names and object scope. Scope is specified by
|
||||
* the the "this" context of NoJQueryPostMessageMixin();
|
||||
* 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
|
||||
* at least three different GitHub users requesting the removal of this
|
||||
* "Opera sniff" on the original project's Issues page, so I figured this
|
||||
* would be a relatively safe change.
|
||||
* 4. `postMessage` no longer uses `$.param` to serialize messages that are not
|
||||
* strings. I actually prefer this structure anyway. `receiveMessage` does
|
||||
* not implement a corresponding deserialization step, and as such it seems
|
||||
* cleaner and more symmetric to leave both data serialization and
|
||||
* deserialization to the client.
|
||||
* 5. The use of `$.isFunction` is replaced by a functionally-identical check.
|
||||
* 6. The `$:nomunge` YUI option is no longer necessary.
|
||||
*/
|
||||
|
||||
function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
|
||||
|
||||
var setMessageCallback, unsetMessageCallback, currentMsgCallback,
|
||||
intervalId, lastHash, cacheBust = 1;
|
||||
|
||||
if (window.postMessage) {
|
||||
|
||||
if (window.addEventListener) {
|
||||
setMessageCallback = function(callback) {
|
||||
window.addEventListener('message', callback, false);
|
||||
}
|
||||
|
||||
unsetMessageCallback = function(callback) {
|
||||
window.removeEventListener('message', callback, false);
|
||||
}
|
||||
} else {
|
||||
setMessageCallback = function(callback) {
|
||||
window.attachEvent('onmessage', callback);
|
||||
}
|
||||
|
||||
unsetMessageCallback = function(callback) {
|
||||
window.detachEvent('onmessage', callback);
|
||||
}
|
||||
}
|
||||
|
||||
this[postBinding] = function(message, targetUrl, target) {
|
||||
if (!targetUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The browser supports window.postMessage, so call it with a targetOrigin
|
||||
// set appropriately, based on the targetUrl parameter.
|
||||
target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
||||
}
|
||||
|
||||
// Since the browser supports window.postMessage, the callback will be
|
||||
// bound to the actual event associated with window.postMessage.
|
||||
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
||||
// Unbind an existing callback if it exists.
|
||||
if (currentMsgCallback) {
|
||||
unsetMessageCallback(currentMsgCallback);
|
||||
currentMsgCallback = null;
|
||||
}
|
||||
|
||||
if (!callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Bind the callback. A reference to the callback is stored for ease of
|
||||
// unbinding.
|
||||
currentMsgCallback = setMessageCallback(function(e) {
|
||||
switch(Object.prototype.toString.call(sourceOrigin)) {
|
||||
case '[object String]':
|
||||
if (sourceOrigin !== e.origin) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case '[object Function]':
|
||||
if (sourceOrigin(e.origin)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
callback(e);
|
||||
});
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
this[postBinding] = function(message, targetUrl, target) {
|
||||
if (!targetUrl) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The browser does not support window.postMessage, so set the location
|
||||
// of the target to targetUrl#message. A bit ugly, but it works! A cache
|
||||
// bust parameter is added to ensure that repeat messages trigger the
|
||||
// callback.
|
||||
target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
|
||||
}
|
||||
|
||||
// Since the browser sucks, a polling loop will be started, and the
|
||||
// callback will be called whenever the location.hash changes.
|
||||
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId);
|
||||
intervalId = null;
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
delay = typeof sourceOrigin === 'number'
|
||||
? sourceOrigin
|
||||
: typeof delay === 'number'
|
||||
? delay
|
||||
: 100;
|
||||
|
||||
intervalId = setInterval(function(){
|
||||
var hash = document.location.hash,
|
||||
re = /^#?\d+&/;
|
||||
if ( hash !== lastHash && re.test( hash ) ) {
|
||||
lastHash = hash;
|
||||
callback({ data: hash.replace( re, '' ) });
|
||||
}
|
||||
}, delay );
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
12
wp-content/plugins/deployer-for-git/freemius/assets/js/nojquery.ba-postmessage.min.js
vendored
Normal file
12
wp-content/plugins/deployer-for-git/freemius/assets/js/nojquery.ba-postmessage.min.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* nojquery-postmessage by Jeff Lee
|
||||
* a non-jQuery fork of:
|
||||
*
|
||||
* jQuery postMessage - v0.5 - 9/11/2009
|
||||
* http://benalman.com/projects/jquery-postmessage-plugin/
|
||||
*
|
||||
* Copyright (c) 2009 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
|
@@ -0,0 +1,135 @@
|
||||
(function ($, undef) {
|
||||
var global = this;
|
||||
|
||||
// Namespace.
|
||||
global.FS = global.FS || {};
|
||||
|
||||
global.FS.PostMessage = function ()
|
||||
{
|
||||
var
|
||||
_is_child = false,
|
||||
_postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
|
||||
_callbacks = {},
|
||||
_base_url,
|
||||
_parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
|
||||
_parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
|
||||
_init = function () {
|
||||
_postman.receiveMessage(function (e) {
|
||||
var data = JSON.parse(e.data);
|
||||
|
||||
if (_callbacks[data.type]) {
|
||||
for (var i = 0; i < _callbacks[data.type].length; i++) {
|
||||
// Execute type callbacks.
|
||||
_callbacks[data.type][i](data.data);
|
||||
}
|
||||
}
|
||||
}, _base_url);
|
||||
},
|
||||
_hasParent = ('' !== _parent_url),
|
||||
$window = $(window),
|
||||
$html = $('html');
|
||||
|
||||
return {
|
||||
init : function (url, iframes)
|
||||
{
|
||||
_base_url = url;
|
||||
_init();
|
||||
|
||||
// Automatically receive forward messages.
|
||||
FS.PostMessage.receiveOnce('forward', function (data){
|
||||
window.location = data.url;
|
||||
});
|
||||
|
||||
iframes = iframes || [];
|
||||
|
||||
if (iframes.length > 0) {
|
||||
$window.on('scroll', function () {
|
||||
for (var i = 0; i < iframes.length; i++) {
|
||||
FS.PostMessage.postScroll(iframes[i]);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
init_child : function ()
|
||||
{
|
||||
this.init(_parent_subdomain);
|
||||
|
||||
_is_child = true;
|
||||
|
||||
// Post height of a child right after window is loaded.
|
||||
$(window).bind('load', function () {
|
||||
FS.PostMessage.postHeight();
|
||||
|
||||
// Post message that window was loaded.
|
||||
FS.PostMessage.post('loaded');
|
||||
});
|
||||
},
|
||||
hasParent : function ()
|
||||
{
|
||||
return _hasParent;
|
||||
},
|
||||
postHeight : function (diff, wrapper) {
|
||||
diff = diff || 0;
|
||||
wrapper = wrapper || '#wrap_section';
|
||||
this.post('height', {
|
||||
height: diff + $(wrapper).outerHeight(true)
|
||||
});
|
||||
},
|
||||
postScroll : function (iframe) {
|
||||
this.post('scroll', {
|
||||
top: $window.scrollTop(),
|
||||
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
||||
}, iframe);
|
||||
},
|
||||
post : function (type, data, iframe)
|
||||
{
|
||||
console.debug('PostMessage.post', type);
|
||||
|
||||
if (iframe)
|
||||
{
|
||||
// Post to iframe.
|
||||
_postman.postMessage(JSON.stringify({
|
||||
type: type,
|
||||
data: data
|
||||
}), iframe.src, iframe.contentWindow);
|
||||
}
|
||||
else {
|
||||
// Post to parent.
|
||||
_postman.postMessage(JSON.stringify({
|
||||
type: type,
|
||||
data: data
|
||||
}), _parent_url, window.parent);
|
||||
}
|
||||
},
|
||||
receive: function (type, callback)
|
||||
{
|
||||
console.debug('PostMessage.receive', type);
|
||||
|
||||
if (undef === _callbacks[type])
|
||||
_callbacks[type] = [];
|
||||
|
||||
_callbacks[type].push(callback);
|
||||
},
|
||||
receiveOnce: function (type, callback)
|
||||
{
|
||||
if (this.is_set(type))
|
||||
return;
|
||||
|
||||
this.receive(type, callback);
|
||||
},
|
||||
// Check if any callbacks assigned to a specified message type.
|
||||
is_set: function (type)
|
||||
{
|
||||
return (undef != _callbacks[type]);
|
||||
},
|
||||
parent_url: function ()
|
||||
{
|
||||
return _parent_url;
|
||||
},
|
||||
parent_subdomain: function ()
|
||||
{
|
||||
return _parent_subdomain;
|
||||
}
|
||||
};
|
||||
}();
|
||||
})(jQuery);
|
Reference in New Issue
Block a user