This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| // jQuery is required to run this snippet | |
| // They are provided above from reliable CDNs if your page doesn't already have them added. | |
| var uberGlobalize = (function(){ | |
| var cloudFlareCDN = "//cdnjs.cloudflare.com/ajax/libs/globalize/0.1.1/cultures", | |
| currentCulture = "", | |
| previousCulture = "", | |
| getCurrencySymbol = function( culture ) { | |
| // Defaults to USD buck symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * QuickStorage and ProtectedStorage | |
| * @brief A caching control mechanism | |
| * @author Ray Peters <[email protected]> | |
| */ | |
| function QuickStorage(){ | |
| this._cache = {}; | |
| } | |
| QuickStorage.prototype.setItem = function( key, val ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This design pattern allows you to wait without hogging up resources like | |
| // setInterval, nor giving you an errand like clearInterval() after it's done | |
| function doStuff(){ | |
| if ( !something.isReady ) { | |
| setTimeout( doStuff, 50 ); | |
| return; | |
| } | |
| // Actually do the stuff you need to wait for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // HOW TO USE: Click start from scratch and be looking at the "Add Block" box | |
| // CONFIGURATIONS | |
| var SPLIT_TEST_INDEX = 0; | |
| var optEditor = ontraport.window.panel.currentPane.components.editor_component, | |
| optEditorModel = optEditor.options.model, | |
| BlockStylesModel = ontraport.Models.Objects.getModel( 131 ), | |
| BlockTypes = ontraport.Models.Objects.getModel( 132 ), | |
| _def = $.Deferred(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @brief - ONTRAPORT Orderform Translation Script | |
| * @author Ray Peters - <[email protected]> | |
| */ | |
| ;( function(){ | |
| // TRANSLATION MAP | |
| var TRANSLATIONS = { | |
| "One-time payment of": "Pago por única vez de", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* @author Ray Peters <[email protected]> */ | |
| jQuery( document ).ready( function(){ | |
| /* CUSTOMIZATIONS */ | |
| /* A list of cultures available @ http://cdnjs.com/libraries/globalize */ | |
| /* A list of cultures to try and load is available on the left-most column of @ http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm */ | |
| /* Common country codes -- AUSTRALIA: en-AU, GREAT BRITAIN: en-GB */ | |
| var COUNTRY_CODE = "en-GB"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(){ | |
| // jQuery is required to run this snippet | |
| // They are provided above from reliable CDNs if your page doesn't already have them added. | |
| var _uberGlobalize = ( function(){ | |
| var cloudFlareCDN = "//cdnjs.cloudflare.com/ajax/libs/globalize/0.1.1/cultures", | |
| currentCulture = "", | |
| previousCulture = "", | |
| getCurrencySymbol = function( culture ) { | |
| // Defaults to USD buck symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $( document ).ready( function(){ | |
| // Interesting thing happens when you have so many images on the page. | |
| // Count them and wait for every onload event to fire. | |
| var $images = $( "img" ), | |
| imagesLoadedHandler = function(){ | |
| var totalImagesToLoad = $images.length, | |
| imageLoadedCount = 0; | |
| return function(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * How to use: | |
| * Step 1: Navigate to the given template you're curious about and paste this in the console. | |
| * Step 2: ??? | |
| * Step 3: Profit | |
| * | |
| * @author Jonathan Preston <[email protected]>, Ray Peters <[email protected]> | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* place this in footer scripts */ | |
| $( document ).ready( function() { | |
| $(".container:has(form[action*='form_processor.php'])" ) | |
| .attr( "id", "signup-form" ) | |
| .attr( "name", "signup-form" ); | |
| $( "a[href*='jump-to-signup-form']" ).attr( "href", "#signup-form" ); | |
| } ); | |
| /* name your link URL something like: http://jump-to-signup-form.com */ |
OlderNewer