diff --git a/.frame/object_param.JSON b/.frame/object_param.JSON new file mode 100644 index 0000000..7b43299 --- /dev/null +++ b/.frame/object_param.JSON @@ -0,0 +1,2 @@ +//* set_secure + diff --git a/.frame/sidebar.js b/.frame/sidebar.js new file mode 100644 index 0000000..c2967fc --- /dev/null +++ b/.frame/sidebar.js @@ -0,0 +1,10 @@ +(function () {if (KXL && KXL.i18n && KXL.i18n.addLocales) {KXL.i18n.addLocales({"sidebar.notifications.title":"notifications","sidebar.chat.title":"chat","sidebar.search.title":"search"});}}()); + +(function () {var head = document.getElementsByTagName("head")[0];var style = document.createElement("style");style.type = "text/css";style.innerHTML = ".kx-sidebar{position:relative;height:100%;width:339px}.kx-sidebar .kx-sidebar-content-region{height:100%;background-color:#131313}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout{overflow-y:auto;overflow-x:hidden;position:relative}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading{height:41px;line-height:41px;background-color:#252525;border-bottom:1px solid #424242;text-align:center}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-sidebar-close-btn{position:absolute;right:4px;top:10px;width:21px;height:21px;border:none;background-color:transparent;background-image:url(/modules/sidebar/images/../../common/images/sidebar-close-button-sprite.png);background-position:0 -100%;cursor:pointer}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-sidebar-close-btn:hover{background-position:0 0}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-title{display:inline-block}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-title span{width:200px;height:41px;display:block;line-height:41px;padding-left:7px;vertical-align:middle;font-weight:700;font-size:14px;color:#FFF;font-family:myriad-pro,verdana,helvetica,sans-serif;text-transform:uppercase;text-shadow:#000 0 -1px 0}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-cta-region .kx-settings-button{position:absolute;right:31px;top:9px;width:24px;height:23px;border:none;background:url(/modules/sidebar/images/../../common/images/sidebar-settings-cog-sprite.png) 0 -100%;cursor:pointer}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-cta-region .kx-settings-button:hover{background-position:0 0}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-cta-region .kx-sidebar-cta-button{position:absolute;right:37px;top:8px;height:19px}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-cta-region .kx-breadcrumb-back-button{position:absolute;left:8px;top:12px;width:12px;height:18px;border:none;background:url(/modules/sidebar/images/../../common/images/back-button-sprite.png) 0 -100%;cursor:pointer}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-panel-layout .kx-heading .kx-heading-cta-region .kx-breadcrumb-back-button:hover{background-position:0 0}.kx-sidebar .kx-sidebar-content-region .kx-ribbon-region{position:relative;max-height:400px;overflow-y:auto;background-color:#252525;-webkit-box-shadow:rgba(0,0,0,.6) 0 3px 5px inset;-moz-box-shadow:rgba(0,0,0,.6) 0 3px 5px inset;box-shadow:rgba(0,0,0,.6) 0 3px 5px inset}.kx-sidebar .kx-sidebar-content-region .kx-content-region{overflow-x:hidden;background-color:#0e0e0e}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-footer-region{display:none}.kx-sidebar .kx-sidebar-content-region .kx-sidebar-footer-region.visible{display:block;position:absolute;height:41px;right:0;bottom:0;left:0;text-align:right;background-color:#2d2d2d}";head.appendChild(style);}()); + +(function () {this.Templates=this.Templates||{},this.Templates["sidebar/sidebar-panel-layout"]=Handlebars.template(function(i,e,s,n,a){return this.compilerInfo=[4,">= 1.0.0"],s=this.merge(s,i.helpers),a=a||{},'
\n
\n\n
\n
\n
\n\n
\n'});}()); + +/* kxl-deployment-tools 2016-05-18 */ + +KXL.module("Sidebar.Views",function(a,b,c,d,e,f){a.SidebarLayout=b.Components.Layout.extend({initialize:function(){this.debouncedSizeAdjust=f.debounce(this.sizeAdjust.bind(this),5)},template:function(){return""},className:"kx-sidebar",onRender:function(){e(window).on("resize",this.sizeAdjust.bind(this))},onClose:function(){e(window).off("resize",this.sizeAdjust.bind(this))},sizeAdjust:function(){var a=this.regions,b=this;if(a){var c=f.keys(a);f.each(c,function(c){a[c].currentView&&a[c].currentView.trigger("container:size:adjust",b.$el.outerHeight(!0))})}}}),a.SidebarPanelLayout=b.Components.Layout.extend({template:Templates["sidebar/sidebar-panel-layout"],className:"kx-sidebar-panel-layout",regions:{ribbonRegion:".kx-ribbon-region",contentRegion:".kx-content-region",headerCTARegion:".kx-heading-cta-region",footerCTARegion:".kx-sidebar-footer-region"},ui:{header:".kx-heading"},triggers:{"click .kx-sidebar-close-btn":"sidebar:close"},currentId:null,onRender:function(){var a=this;this.currentId=this.options.contentId,this.on("container:size:adjust",function(b){a.containerHeight=b,a.sizeAdjust(b)})},onSidebarClose:function(){if(this.currentId){"chat"===this.currentId&&b.execute("chat:toggle");var a=b.request("sidebar:get:content",this.currentId);a&&a.$el.is(":visible")&&b.request("sidebar:hide:content",this.currentId)}},sizeAdjust:function(a){var b=a||this.containerHeight,c=0,d=this.ui.header.outerHeight(!0)||0;if(b&&this.ribbonRegion.currentView&&this.ribbonRegion.currentView.$el){var e=this.ribbonRegion.$el,f=this.ribbonRegion.currentView&&this.ribbonRegion.currentView.$el,g=(b-d)/1.33;f&&f.outerHeight(!0)=this.contentRegion.$el.prop("scrollHeight")-a&&this.contentRegion.currentView.trigger("sidebar:content:at:bottom:scroll")},templateHelpers:function(){var a={};return this.options.headingText&&(a.headingText=this.options.headingText),a}})}),KXL.module("Sidebar",function(a,b,c,d,e,f){var g,h=null,i=!1,j=new b.Entities.Collection([{id:"chat",preload:!1,command:"chat:show",title:b.i18n.t("chat.title")},{id:"friends",preload:!0,asyncRequest:"get:friendspanel:view",title:b.i18n.t("friends.panel.title")},{id:"notifications",preload:!0,request:"notifications:get",title:b.i18n.t("sidebar.notifications.title"),asyncModule:"notifications"}]),k=!1;j=f.extend(j,new c.PickThis.SingleSelect(j,"sidebarStates"));var l=d.Controller.extend({initialize:function(){var c=this;g=b.request("current:user:settings:entity"),h=new a.Views.SidebarLayout,h.on("show",function(){b.atom.set("sidebar",h)}),b.atom.once("sidebar:states:ready",function(){c._loadSideBarFromState()})},setupSidebar:function(a){b.sidebarRegion.show(this.getSidebar(a))},showSidebar:function(){b.sidebarRegion.$el.show(),this.toggleSidebarPinned(!0),this.adjustViewsToContainerHeight()},hideSidebar:function(){b.sidebarRegion.$el.hide(),this.toggleSidebarPinned(!1)},getSidebar:function(){return h},getSidebarContent:function(a){return h.regions[a]},getSidebarStates:function(){return j},showSidebarContent:function(a,c){var d=h.regions[a];if(d){var e=this,g=f.defaults({},c,{hideOthers:!0}),i=d.$el;if(d.ensureEl(),i.show(),j.select(j.get(a)),b.appModel.set("sideBarState",a),this._saveSideBarState(),g.hideOthers){var k=f.keys(h.regions);f.each(k,function(b){b!==a&&e.hideSidebarContent(b,!1,{silent:!0})})}this.showSidebar()}},hideSidebarContent:function(a,c,d){var e=this,g=f.defaults({},d,{silent:!1});if(!a){var i=f.keys(h.regions);return void f.each(i,function(a){e.hideSidebarContent(a,c,g)})}var k=h.regions[a];if(k){var l=k.$el;l&&(l.hide(),c&&e.removeSidebarContent(a)),this._isAllSidebarContentHidden()&&!g.silent&&(b.appModel.set("sideBarState","closed"),this._saveSideBarState(),j.deselect(j.get(a)),this.hideSidebar())}},removeSidebarContent:function(a){var b=h.regions[a];b&&(b.close(),h.removeRegion(a),b.$el.remove())},createSidebarContent:function(d){var g=this,j=f.defaults({},d,{show:!0,checkExists:!0,removeOnClose:!0}),k=j.contentId,l=j.contentView,m=j.topBarView,n=j.headerCTAViewPointer,o=j.headerCTABreadcrumbViewPointer,p=j.footerCTAViewPointer,q=j.modulePointer||null,r=j.title;if(j.checkExists&&this.getSidebarContent(j.contentId)&&j.show)return void this.showSidebarContent(j.contentId);var s=new n({title:j.title});h.$el.show();var t,u=new a.Views.SidebarPanelLayout({headingText:j.title,contentId:k}),v=h.regions[j.contentId];if(!v){t=e(''),h.$el.append(t),v=new c.Marionette.Region({el:t});var w={};w[j.contentId]=v,h.addRegions(w)}return j.show&&v.on("show",function(){g.showSidebarContent(j.contentId,j)}),u.on("show",function(){function a(a){var c=a.get("members"),d="";if("group"===a.get("type"))f.each(c.models,function(a){d.length?d+=", "+a.get("username"):d=a.get("username")});else if("private"===a.get("type")){var e=c.find(function(a){return a.get("userId")!==b.request("get:current:user").id});e&&(d=e.get("username"))}else d=a.get("title");return d}l.on("show",function(){u.initContentEventListeners()}),u.contentRegion.show(l),q&&g.listenTo(q,"all",function(){}),m&&u.ribbonRegion.show(m),s&&u.headerCTARegion.show(s),q&&(this.listenTo(q,"breadcrumb:show",function(b){i=!0;var c=r;b&&b.thread?(q.trigger("default"===b.thread.get("type")||"private"===b.thread.get("type")?"chat:recipient:hide":"chat:recipient:show"),c=r+": "+a(b.thread)):q.trigger("chat:recipient:show"),l.ui.conversation.addClass("visible"),l.ui.threadsContainer.removeClass("visible"),u.headerCTARegion.show(new o({title:c,thread:b.thread}))}),this.listenTo(q,"breadcrumb:hide",function(){i=!1;var a=r;l.ui.conversation.removeClass("visible"),l.ui.threadsContainer.addClass("visible"),u.headerCTARegion.reset(),u.headerCTARegion.show(new n({title:a})),q.trigger("footer:hide")}),this.listenTo(q,"footer:show",function(){u.footerCTARegion.show(new p),u.footerCTARegion.$el.addClass("visible"),b.vent.trigger("chat:update:ui",this)}),this.listenTo(q,"footer:hide",function(){u.footerCTARegion.$el&&u.footerCTARegion.$el.hasClass("visible")&&(u.footerCTARegion.$el.removeClass("visible"),u.footerCTARegion.reset(),b.vent.trigger("chat:update:ui",this))})),h.sizeAdjust()}),v.show(u),v},_isAllSidebarContentHidden:function(){var a=!0,b=this,c=f.keys(h.regions);return f.each(c,function(c){b.getSidebarContent(c).$el.is(":visible")&&(a=!1)}),a},_preloadStates:function(){var a=this;j.each(function(c){function d(){h=g.get("sideBarState")===c.get("id"),c.get("request")?(e=b.request(c.get("request")),f(e,h)):b.asyncRequest(c.get("asyncRequest")).then(function(a){f(a,h)})}if(c.get("preload")&&c.get("id")&&(c.get("request")||c.get("asyncRequest"))){var e,f=function(b,d){a.createSidebarContent((b.topBarView||b.headerCTAView)&&b.contentView?{contentId:c.get("id"),title:c.get("title"),topBarView:b.topBarView,contentView:b.contentView,headerCTAViewPointer:b.headerCTAView,headerCTABreadcrumbViewPointer:b.headerCTABreadcrumbView,show:d}:{contentId:c.get("id"),title:c.get("title"),contentView:b,show:d})},h=!1;c.get("asyncModule")?b.asyncRequest("async:load:module",c.get("asyncModule")).then(d):d()}}),k=!0,b.atom.set("sidebar:states:ready",!0)},_saveSideBarState:function(){g.set("sideBarState",b.appModel.get("sideBarState")),g.save()},_loadSideBarFromState:function(){var a=b.appModel.get("sideBarState")||g.get("sideBarState");switch(a){case"open":case"chat":b.execute("chat:show");break;case"closed":b.execute("sidebar:hide");break;default:this.getSidebarContent(a)&&this.showSidebarContent(a)}},adjustViewsToContainerHeight:function(){h&&h.sizeAdjust()},checkSidebar:function(){var a=b.request("get:current:user");a?k||this._preloadStates():b.execute("chat:hide")},toggleSidebarPinned:function(a){a?e("body").addClass("kx-pinned"):j.selected||e("body").removeClass("kx-pinned")}});a.Controller=new l}),KXL.module("Sidebar",function(a,b){var c={setupSidebar:function(b){a.Controller.setupSidebar(b)},showSidebarContent:function(b,c){a.Controller.showSidebarContent(b,c)},createSidebarContent:function(b){return a.Controller.createSidebarContent(b)},hideSidebarContent:function(b,c,d){a.Controller.hideSidebarContent(b,c,d)},removeSidebarContent:function(b){a.Controller.removeSidebarContent(b)},getSidebarContent:function(b){return a.Controller.getSidebarContent(b)},showSidebar:function(){a.Controller.showSidebar()},hideSidebar:function(){a.Controller.hideSidebar()},getSidebar:function(){a.Controller.getSidebar()},getSidebarStates:function(){return a.Controller.getSidebarStates()},toggleSidebarPinned:function(b){a.Controller.toggleSidebarPinned(b)},checkSidebar:function(){a.Controller.checkSidebar()},adjustViewsToContainerHeight:function(){a.Controller.adjustViewsToContainerHeight()}};b.addInitializer(function(){b.reqres.setHandlers({"sidebar:create:content":function(a){return c.createSidebarContent(a)},"sidebar:show:content":function(a,b){c.showSidebarContent(a,b)},"sidebar:hide:content":function(a,b,d){c.hideSidebarContent(a,b,d)},"sidebar:remove:content":function(a){c.removeSidebarContent(a)},"sidebar:get:content":function(a){return c.getSidebarContent(a)},"sidebar:get":function(){return c.getSidebar()},"sidebar:get:states":function(){return c.getSidebarStates()}}),b.commands.setHandlers({"sidebar:initialize":function(a){c.setupSidebar(a)},"sidebar:show":function(){c.showSidebar()},"sidebar:hide":function(){c.hideSidebar()},"sidebar:check":function(){c.checkSidebar()},"sidebar:toggle:pinned":function(a){c.toggleSidebarPinned(a)},"sidebar:adjust:children:to:container:height":function(){c.adjustViewsToContainerHeight()}})})}); +//# sourceMappingURL=sidebar.min.js.map diff --git a/.js/app.js b/.js/app.js new file mode 100644 index 0000000..88cc9be --- /dev/null +++ b/.js/app.js @@ -0,0 +1,20 @@ +// DOMContentLoaded is fired once the document has been loaded and parsed, +// but without waiting for other external resources to load (css/images/etc) +// That makes the app more responsive and perceived as faster. +// https://developer.mozilla.org/Web/Reference/Events/DOMContentLoaded +window.addEventListener('DOMContentLoaded', function () { + // We'll ask the browser to use strict code to help us catch errors earlier. + // https://developer.mozilla.org/Web/JavaScript/Reference/Functions_and_function_scope/Strict_mode + 'use strict'; + var translate = navigator.mozL10n.get; + // We want to wait until the localisations library has loaded all the strings. + // So we'll tell it to let us know once it's ready. + navigator.mozL10n.once(start); + // --- + function start() { + var message = document.getElementById('message'); + // We're using textContent because inserting content from external sources into your page using innerHTML can be dangerous. + // https://developer.mozilla.org/Web/API/Element.innerHTML#Security_considerations + message.textContent = translate('message'); + } +}); diff --git a/.js/blackbox.js b/.js/blackbox.js new file mode 100644 index 0000000..7da85b6 --- /dev/null +++ b/.js/blackbox.js @@ -0,0 +1,32 @@ + + // iOvation Integration using Callback Function Collection Method + + // basic configuration + var io_install_stm = false; // do not install Active X + var io_exclude_stm = 12; // do not run Active X + var io_install_flash = false; // do not install Flash + var io_enable_rip = true; // collect Real IP information + var deviceFingerPrint = ''; + + /** + * The Callback Function Collection Method allows you to manage blackbox generation in a more event-driven manner. + * As blackbox collection progresses, snare.js fires update events when a collection method has completed. + * These events trigger a user-defined callback function to update the page with the new blackbox value. + * When all of the collection methods are completed, a Boolean flag is set indicating no further updates are + * expected and the value is final blackbox value. + * This method requires: + * 1. Enabling collection of Real IP information by setting io_enable_rip. + * 2. Setting the variables to handle user notifications: io_install_flash. + * 3. Set io_bb_callback to a function that processes the new blackbox value. + * @param bb : the updated value of the blackbox. + * @param isComplete : a Boolean indicating whether all the collection methods have completed. + */ + var io_bb_callback = function (bb, isComplete) + { + console.log('io_bb_callback function called with isComplete: ' + isComplete); + if (isComplete) { + deviceFingerPrint = bb; + console.log('Blackbox collection completed. bb: ' + bb); + } + }; + diff --git a/.js/diff.js b/.js/diff.js new file mode 100644 index 0000000..ac85064 --- /dev/null +++ b/.js/diff.js @@ -0,0 +1,56 @@ +_dispatch: function(e) { + try { + var a = JSON.parse(e.data) + } catch (ex) { + console.warn("postmessage data invalid json: ", ex); + return + } + if (!a.type) { + console.warn("postmessage message type required"); + return + } + var b = n.data("callbacks.postmessage") || {}, + cb = b[a.type]; + if (cb) { + cb(a.data) + } else { + var l = n.data("listeners.postmessage") || {}; + var c = l[a.type] || []; + for (var i = 0, len = c.length; i < len; i++) { + var o = c[i]; + if (o.origin && e.origin !== o.origin) { + console.warn("postmessage message origin mismatch", e.origin, o.origin); + if (a.errback) { + var d = { + message: "postmessage origin mismatch", + origin: [e.origin, o.origin] + }; + n.send({ + target: e.source, + data: d, + type: a.errback + }) + } + continue + } + try { + var r = o.fn(a.data); + if (a.callback) { + n.send({ + target: e.source, + data: r, + type: a.callback + }) + } + } catch (ex) { + if (a.errback) { + n.send({ + target: e.source, + data: ex, + type: a.errback + }) + } + } + } + } +} diff --git a/.js/install.js b/.js/install.js new file mode 100644 index 0000000..b1a5ca3 --- /dev/null +++ b/.js/install.js @@ -0,0 +1,772 @@ +/* + * src/json2.js + */ + +if (! ("JSON" in window && window.JSON)){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i'; + (document.getElementById(self.lightboxlauncherDiv)?document.getElementById(self.lightboxlauncherDiv).parentNode:document.body).appendChild( + (function(){ + var el = document.createElement('div'); + el.style.position = 'absolute'; + el.style.width="100%"; + el.style.top="0px"; + el.innerHTML = divbHTML; + return (el.childNodes[0]); + })() + ); + } + if (options.options && options.options.source == 'LightboxLauncher'){ + self.displayUltimatePay({source:options.options.source}); + } + else{ + self.displayUltimatePay(); + } + if (self.ieVersion==6 || self.ieVersion==7){ + window.location.hash = ''; + } + + + } + catch(e){console.log(e);} + + }); + + + pm.bind('doResize', function(dims){ + var cont = document.getElementById(self.lightboxDiv); + var iframe = cont.getElementsByTagName('iframe')[0]; + cont.style.width = iframe.style.width = dims.width + 'px'; + cont.style.height = iframe.style.height = dims.height + 'px'; + + }); + + pm.bind('paymentSuccess', function(data){ + self.fireEvent('paymentSuccess', data); + + }); + + } + + + +}; + +UPay.prototype = { + upParams : {"method": "StartOrderFrontEnd", "display" : "Lightbox"}, + upConfirmParams : {"method":"GetConfirmation", "display" : "Lightbox"}, + pbcQueryString: "", + lightboxDiv:'div_b', + lightboxLauncherDiv:'div_ll', + listeners:{}, + + getVersion: function(){ + return(this.version); + }, + removeEl: function(el){ + if(el && el.parentNode){ + el.parentNode.removeChild(el); + return el; + } + return false; + }, + closeBox: function(data){ + + this.hide(this.lightboxDiv); + this.html(this.lightboxDiv,''); + var dl = document.getElementById('DLFrameWrap'); + if (dl && dl.parentNode) {dl.parentNode.removeChild(dl);} + + this.fireEvent('closeLB', data); + }, + displayUltimatePay: function(opts){ + var self = this; + + var _displayUltimatePay = function(opts){ + // calculate startTime of script + cd = new Date(); + clickTime = cd.getTime(); + + opts = opts||{}; + + this.pbcQueryString = ""; + //todo - use arguments + /** + * ..we have to reset these params + */ + + + this.upParams = {"method": "StartOrderFrontEnd", "display" : "Lightbox"}; + this.upParams = this.mergeJsonObj(ultimatePayParams, this.upParams, true); + + //click time add into params + var clickTimeObj = {"clicktime":clickTime}; + this.upParams = this.mergeJsonObj(clickTimeObj, this.upParams, true); + /** + * append parentUrl in the end + */ + var parentUrlObj = {"parenturl":this.parentUrl}; + this.upParams = this.mergeJsonObj(parentUrlObj, this.upParams, true); + + + if(this.upParams.xdurl && this.upParams.xdurl.indexOf(':')>0){ + this.upParams.xdurl = escape(this.upParams.xdurl); + } + + this.preparePbcQueryString(this.upParams); + + if(!this.ultimatePay){ + this.displayIframe(); + } else { + this.displayUltimatePayIframe(); + } + + }; + + if(Playspan.doServerHealthCheck!=true){ + _displayUltimatePay.apply(self, [opts]); + return; + } + + Playspan.serverHealth = false; + Playspan.serverHealthTimeout = false; + Playspan.server404 = false; + + (function(){ + var testHealthScript = '//www.ultimatepay.com/shared/js/health.js?_=' + (new Date()).getTime(); + var testHealthEl = document.createElement('script'); + var lBdisplayed = false; + var ieCtr = 0; + + + var ifHealthy = function(){ + + if (Playspan.serverHealth==true && Playspan.serverHealthTimeout==false && lBdisplayed==false ){ + lBdisplayed=true; + _displayUltimatePay.apply(self, [opts]); + } + }; + + if (Playspan.serverHealth==true && Playspan.serverHealthTimeout==false){ + ifHealthy(); + return; + } + + + testHealthEl.onreadystatechange=ifHealthy; + testHealthEl.onload = ifHealthy; + + testHealthEl.onerror = function(){ + Playspan.serverHealthTimeout = true; + Playspan.server404 = true; + ifServerDown(); + }; + + + var ifServerDown = function(){ + var elStr = '
'+ + '
'+ + ' UltimatePay'+ + '
'+ + '
'+ + +'
'+ + '
Info
'+ + '
'+ + '
Scheduled Maintenance
'+ + '
We\'re doing some maintenance on our servers right now. We\'ll be right back. Thank you!
'+ + '
'+ + '
'+ + '
'; + var el = document.createElement('div'); + el.innerHTML = elStr; + var targetEl = el.childNodes[0]; + targetEl.style.top = (document.body.scrollTop + 20) + 'px'; + targetEl.style.left = ((document.body.offsetWidth - 620)/2) + 'px'; + document.body.appendChild(targetEl); + + }; + + setTimeout(function(){ + if (Playspan.serverHealth!=true && Playspan.server404 == false){ + Playspan.serverHealthTimeout = true; + ifServerDown(); + + } + + + }, 7000);//15 second timeout + + + document.body.appendChild(testHealthEl); + testHealthEl.src = testHealthScript; + + })(); + + + + + + + + }, + + displayAutoUltimatePay: function(isPopupEnabled){ + if(gup('token') != "" && isPopupEnabled){ + //....no popup for others + if(gup('noLb') != 1){ + /** + * ..we have to reset these params also + */ + this.upConfirmParams = {"method":"GetConfirmation", "display" : "Lightbox", "token": gup("token"), "parenturl":this.parentUrl}; + this.preparePbcQueryString(this.upConfirmParams); + + this.displayUltimatePayIframe(); + } + + return true; + } + return false; + }, + + displayIframe: function(){ + /** + * var params = "&sn=UT04&userid=ps1_ABCDE&accountname=ps1_12345&mirror=MirrorValue&pkgid=030D¤cy=USD&amount=9.95&amountdesc=Amount+Description+Goes+Here&sepamount=10.00&sepamountdesc=Separate+Item+Description+Goes+Here&fname=Test&lname=User&addr1=123+Bogus+St&city=Charlottesville&st=VA&zip=22901&country=US&phone1=%28434%29+984-0007&email=ps1%40paybycash.com&hash=83f9c675eb3e51d0fd20445d3f0f8eac&language=en"; + * ulp.upLiveUrl = 'https://www.ultimatepay.com/app/api/live/?method=StartOrderFrontEnd&display=UltimatePay'+params; // live site + * ulp.upLiveUrl = 'https://www.ultimatepay.com/app/api/test/?method=StartOrderFrontEnd&display=UltimatePay'+params; // test site + */ + var url = this.upLiveUrl+this.pbcQueryString; + + + var iframe = ''+this.getCloseButton(); + this.html('div_b', iframe); + this.show('div_b'); + + + if(this.debug){ + alert(url); + } + }, + displayUltimatePayIframe: function(){ + /** + * var params = "&sn=UT04&userid=ps1_ABCDE&accountname=ps1_12345&mirror=MirrorValue&pkgid=030D¤cy=USD&amount=9.95&amountdesc=Amount+Description+Goes+Here&sepamount=10.00&sepamountdesc=Separate+Item+Description+Goes+Here&fname=Test&lname=User&addr1=123+Bogus+St&city=Charlottesville&st=VA&zip=22901&country=US&phone1=%28434%29+984-0007&email=ps1%40paybycash.com&hash=83f9c675eb3e51d0fd20445d3f0f8eac&language=en"; + * ulp.upLiveUrl = 'https://www.ultimatepay.com/app/api/live/?method=StartOrderFrontEnd&display=UltimatePay'+params; // live site + * ulp.upLiveUrl = 'https://www.ultimatepay.com/app/api/test/?method=StartOrderFrontEnd&display=UltimatePay'+params; // test site + */ + var url = this.upLiveUrl+this.pbcQueryString; + + var spinnerImgUrl = 'https://static.pbc.com/shared/images/ultimatepay/ajax-loader.gif'; + var spinnerDiv = '
'; + + + + /** + * If selected test site then open in new window + */ + if(this.upLiveUrl.match('/test/') != null){ + window.open(url,"TestSite"); + return; + } + + + var iframeStr = ''; + + var div; + + if(this.upParams.display==='Lightbox' || this.upParams.display.toLowerCase() === 'playstation3'){ + div = this.lightboxDiv; + + iframeStr = ''+ spinnerDiv; //+ (this.ieVersion==7?this.getUltimatePayCloseButton():''); + + } + else if(this.upParams.display==='LightboxLauncher'){ + div = this.lightboxLauncherDiv; + iframeStr = ''; + } + this.html(div, iframeStr); + this.show(div); + + if(this.debug){ + alert(url); + } + }, + onIFload:function(){ + var spinner = document.getElementById('spinnerdiv'); + if(spinner && spinner.parentNode) spinner.parentNode.removeChild(spinner); + + }, + + getCloseButton: function(){ + var closeStr = ''; + return closeStr; + }, + getUltimatePayCloseButton: function(){ + var closeStr = '
'; + closeStr += ''; + closeStr += '
'; + return closeStr; + }, + parentLBOpen:function(upParamsObj, upLiveUrl, parentWindowUrl, options){ + pm({ + "target": window.parent, + "type": 'openLB', + "data": { + "ultimatePayParams":upParamsObj, + "upLiveUrl" : upLiveUrl, + "options":options + }, + "url":parentWindowUrl + }); + + }, + + + submitPaymentOption: function(id){ + var ele = this.getElement('payid'+id); + + this.html('submitButton', ''); + var contentHtml = ''; + this.html('submitButton', contentHtml); + }, + + /** + * Payment options on choose page/more payment option page + */ + initPaymentOptions:function(){ + var parent = document.getElementById('pay_buttons'); + var hNodes = parent.childNodes; + /** + * Count the total number of pages + */ + for(var i=0;i 0){ + this.payPages = Math.ceil(this.allPayOptsIds.length / this.noPayOptsPerPage); + } + //show first and hide others + for(var i=0;i < this.allPayOptsIds.length; i++) { + var ele = document.getElementById(this.allPayOptsIds[i]); + if(i < (this.currPayPage * this.noPayOptsPerPage) ) { + ele.className = 'pay_option show'; + }else{ + ele.className = 'pay_option hide'; + } + } + + + }, + prevPaymentPage:function(){ + if( "1" == this.currPayPage){ + return; + }else{ + document.getElementById('page'+this.currPayPage).style.display = 'none'; + this.currPayPage--; + document.getElementById('page'+this.currPayPage).style.display = ''; + } + }, + nextPaymentPage:function(){ + if( this.payPages == this.currPayPage){ + return; + }else{ + document.getElementById('page'+this.currPayPage).style.display = 'none'; + this.currPayPage++; + document.getElementById('page'+this.currPayPage).style.display = ''; + } + }, + + preparePbcQueryString: function(upParams){ + for(var param in upParams){ + if(this.pbcQueryString==""){ + this.pbcQueryString += param+"="+upParams[param]; + }else{ + this.pbcQueryString += "&"+param+"="+upParams[param]; + } + } + if(this.avoidRequestCache){ + if(this.pbcQueryString==""){ + this.pbcQueryString += "no-cache="+new Date().getTime(); + }else{ + this.pbcQueryString += "&no-cache="+new Date().getTime(); + } + } + if(this.debug){ + alert(this.pbcQueryString); + } + }, + /** + * Load more payment methods + */ + onMethodSelect: function(id){ + this.selected_pay = id; + + this.submitPaymentOption(id); + + }, + + + /** + * Common methods + */ + mergeJsonObj: function(src, dest, overwrite){ + for(var z in src){ + if(!dest.hasOwnProperty(z) || overwrite){ + dest[z] = src[z]; + } + } + return dest; + }, + getElement: function(selector){ + this.elem = document; + if ( typeof selector == "string" ){ + this.elem = document.getElementById(selector); + } + return this.elem; + }, + show: function(selector){ + this.getElement(selector).style.display = ''; + }, + hide: function(selector){ + this.getElement(selector).style.display = 'none'; + }, + html: function (selector, content){ + this.getElement(selector).innerHTML = content; + }, + timeOut: function(ms, selector){ + var _self = this; + setTimeout(function (){ + _self.show(selector); + }, ms); + }, + on:function(evtName, fn){ + if(!this.listeners[evtName]){ + this.listeners[evtName] = []; + } + this.listeners[evtName].push(fn); + + + }, + fireEvent:function(evtName, argsObj){ + if(!this.listeners[evtName]){ + this.listeners[evtName] = []; + } + for(var i=0;i li').size(); + $('#' + obj.container + ' ul').css('width', wrapperwidth ); + var wrapperheight = $('#' + obj.container + '').height(); + $('#' + obj.container + ' ul').css('height', wrapperheight); + + //set my li width + var height = $('#' + obj.container + '').height(); + $('#' + obj.container + ' ul li').css('height', height); + + //set my counter vars + var counter = $('#' + obj.container + ' ul > li').size(); + var decount = 1; + var autocount = 1; + var autoPlayTime = obj.autoPlayTime; + + if( ! autoPlayTime ){ + autoPlayTime = 5000; + } + + var x = setInterval( goNext, autoPlayTime ); + + //slide the button to the next item + function goNext() { + + clearInterval(x); + x = setInterval( goNext, autoPlayTime ); + + if ( decount < counter) { + + $('#' + obj.container + ' .slides').animate({ left: '-=' + $('#' + obj.container + '').width() }, 400, 'swing', function() { }); + $('.' + obj.sliderlinks + ' a.current').removeClass('current').next().addClass('current'); + decount++; + }else{ + + decount = 1; + var clickednum = decount * - $('#' + obj.container + '').width() + $('#' + obj.container + '').width(); + $('#' + obj.container + ' .slides').animate({ left: clickednum }, 400, 'swing', function() { }); + $('#' + obj.container + ' .current').removeClass('current'); + + $('.' + obj.sliderlinks + ' a').each(function(){ + $(this).removeClass( 'current' ); + if( $(this).attr( "pg" ) == decount){ + $(this).addClass( 'current' ); + } + }); + } + } + + function goBack() { + + clearInterval(x); + x = setInterval( goNext, autoPlayTime ); + + if ( decount > 1) { + + $('#' + obj.container + ' .slides').animate({ left: '+=' + $('#' + obj.container + '').width() }, 400, 'swing', function() { }); + $('.' + obj.sliderlinks + ' a.current').removeClass('current').prev().addClass('current'); + decount--; + + } + } + + //make the number clickable + $('.' + obj.sliderlinks + ' a').click(function() { + + clearInterval(x); + x = setInterval( goNext, autoPlayTime ); + + var clickednum = $(this).attr( "pg" ) * - $('#' + obj.container + '').width() + $('#' + obj.container + '').width(); + + $('#' + obj.container + ' ul').animate({ left: clickednum }, 400, 'swing', function() { }); + $('.' + obj.sliderlinks + ' .current').removeClass( 'current' ); + + decount = $(this).attr( "pg" ); + + $('.' + obj.sliderlinks + ' a').each(function(){ + $(this).removeClass( 'current' ); + if( $(this).attr( "pg" ) == decount){ + $(this).addClass( 'current' ); + } + }); + + + + return false; + }); + + + /* + //thaths the hash-shizzle + if ( window.location.hash != '') { + //get hash, scroll to position + var hashnum = window.location.hash.substr(1) * - $('#' + obj.container + '').width() + $('#' + obj.container + '').width(); + $('#' + obj.container + ' ul').animate({ left: hashnum }, 0, function() { }); + //set counters to position + decount = window.location.hash.substr(1); + $('.activenum').removeClass('activenum'); + var hashname = window.location.hash.substr(1); + $('#id' + hashname).addClass('activenum'); + } + */ + + + //get my clickers + if( obj.scrollButtonsContainer ){ + $('#' + obj.scrollButtonsContainer + ' .right').click(function() { goNext(); return false; }); + $('#' + obj.scrollButtonsContainer + ' .left').click(function() { goBack(); return false; }); + }else{ + $('#' + obj.container + ' .right').click(function() { goNext(); return false; }); + $('#' + obj.container + ' .left').click(function() { goBack(); return false; }); + } + //get mousewheel function + //$("#' + obj.container + ' ul").mousewheel(function(event, delta) { if (delta > 0) { goBack(); event.stopPropagation();event.preventDefault(); } }); + //$("#' + obj.container + ' ul").mousewheel(function(event, delta) { if (delta < 0) { goNext(); event.stopPropagation();event.preventDefault(); } }); + +} + +/* +$( '#slider' ).ready(function(){ + makeSlider( {container:'slider', sliderlinks:'sliderPages', scrollButtonsContainer:'sliderNav', autoPlayTime:5000000000} ); +}); +*/ diff --git a/.js/p.js b/.js/p.js index 48fbedf..56cd522 100644 --- a/.js/p.js +++ b/.js/p.js @@ -1,4 +1,7 @@ string +/* *\ +** strict ** +/* *\ https://wwww.kixeye.com

diff --git a/MD.md/install.sh b/MD.md/install.sh new file mode 100644 index 0000000..5e21896 --- /dev/null +++ b/MD.md/install.sh @@ -0,0 +1,150 @@ +#!/bin/bash + +# will throw https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=728775 if run with | bash + +# debian forks only + +# Apache site settings +SITE=php_proxy.conf + +# Apache file to where this will be written +CONF_FILE=/etc/apache2/sites-available/$SITE + +# How much RAM should be allocated to each Apache process? This is measured in kB (kilobytes) because MemTotal below is given in kB +# RSS for an average apache2 php-proxy instance is anywhere from 10-15 MB +# Actual unique memory taken up by each is 2-5 MB. Factor in all the "shared memory", and the real average should be about 5 MB +APACHE_PROCESS_MEM=5000 + +function check_apache(){ + + # check if directory exist + if [ -d /etc/apache2/ ]; then + echo "Apache2 is already installed on this system. This installation only works on fresh systems" + exit + fi +} + +function check_www(){ + + # check if directory exist + if [ -d "/var/www/" ]; then + echo "Contents of /var/www/ will be removed." + read -p "Do you want to continue? [Y/n] " + + if [[ $REPLY =~ ^[Yy]$ ]]; then + rm -rf /var/www/ + else + exit + fi + fi +} + +function install_cron(){ + + # brackets = list of commands to be executed as one unit + # restart apache every 12 hours + crontab -l | { cat; echo "0 0,12 * * * service apache2 restart"; } | crontab - + + # update php-proxy-app everyday on midnight + crontab -l | { cat; echo "0 0 * * * /usr/local/bin/composer update --working-dir=/var/www/"; } | crontab - +} + +function update(){ + + # dist upgrades + apt-get -q update + apt-get -q -y upgrade +} + +function install_composer(){ + + # install composer + curl -sS https://getcomposer.org/installer | php -d suhosin.executor.include.whitelist=phar + mv composer.phar /usr/local/bin/composer + + # preserve those command arguments for every composer call + alias composer='php -d suhosin.executor.include.whitelist=phar /usr/local/bin/composer' +} + +# should we even run this script? +check_apache + +# does /var/www/ already exist? +check_www + +## fresh installations may need to update package locations +update + +## git for composer and bc for math operations - vnstat for bandwidth +apt-get -y install git bc curl vnstat + +# How much RAM does this computer even have? This will be in kilobytes +MEM_TOTAL=$( grep MemTotal /proc/meminfo | awk '{print $2}' ) + +# How much of that RAM should be set aside exclusively for Apache? +APACHE_MEM=$( echo "$MEM_TOTAL * 0.90 / 1" | bc ) + +# MaxClients = Usable Memory / Memory per Apache process +MAX_CLIENTS=$(( $APACHE_MEM / $APACHE_PROCESS_MEM )) + + +# LAMP setup +apt-get -qq -y install apache2 php5 libapache2-mod-php5 php5-curl + +# we need these mods +a2enmod ssl status + +# we don't need these mods. -f to avoid "WARNING: The following essential module will be disabled" +a2dismod -f deflate alias rewrite + +install_composer + +# remove default stuff from apache home directory +# post 2.4: The default Ubuntu document root is /var/www/html. +rm -rf /var/www/* + +## remove old apache configurations +rm -rf /etc/apache2/sites-available/* +rm -rf /etc/apache2/sites-enabled/* + +## create a new configuration file and write our own +touch $CONF_FILE + +echo "Writing to a configuration file $CONF_FILE..."; + +cat > $CONF_FILE < + DocumentRoot /var/www/ + + +ServerLimit $MAX_CLIENTS + + + StartServers 5 + MinSpareServers 5 + MaxSpareServers 10 + MaxClients $MAX_CLIENTS + MaxRequestsPerChild 0 + + +ExtendedStatus On + + + SetHandler server-status + + +EOL + + +## enable our new site - sometimes it's SITE.conf and other times it's just SITE +a2ensite $SITE +service apache2 restart + +composer create-project athlon1600/php-proxy-app:dev-master /var/www/ --no-interaction + +# optimize composer +composer dumpautoload -o --working-dir=/var/www/ + +install_cron diff --git a/MD.md/readme.md b/MD.md/readme.md new file mode 100644 index 0000000..29d13f0 --- /dev/null +++ b/MD.md/readme.md @@ -0,0 +1,110 @@ + + JSObject + + protected JSObject() + + Constructs a new JSObject. Users should not call this method nor subclass JSObject. + + Method Detail + call + + public abstract java.lang.Object call(java.lang.String methodName, + java.lang.Object... args) + throws JSException + + Calls a JavaScript method. Equivalent to "this.methodName(args[0], args[1], ...)" in JavaScript. + + Parameters: + methodName - The name of the JavaScript method to be invoked. + args - An array of Java object to be passed as arguments to the method. + Returns: + Result of the method. + Throws: + JSException + + eval + + public abstract java.lang.Object eval(java.lang.String s) + throws JSException + + Evaluates a JavaScript expression. The expression is a string of JavaScript source code which will be evaluated in the context given by "this". + + Parameters: + s - The JavaScript expression. + Returns: + Result of the JavaScript evaluation. + Throws: + JSException + + getMember + + public abstract java.lang.Object getMember(java.lang.String name) + throws JSException + + Retrieves a named member of a JavaScript object. Equivalent to "this.name" in JavaScript. + + Parameters: + name - The name of the JavaScript property to be accessed. + Returns: + The value of the propery. + Throws: + JSException + + setMember + + public abstract void setMember(java.lang.String name, + java.lang.Object value) + throws JSException + + Sets a named member of a JavaScript object. Equivalent to "this.name = value" in JavaScript. + + Parameters: + name - The name of the JavaScript property to be accessed. + value - The value of the propery. + Throws: + JSException + + removeMember + + public abstract void removeMember(java.lang.String name) + throws JSException + + Removes a named member of a JavaScript object. Equivalent to "delete this.name" in JavaScript. + + Parameters: + name - The name of the JavaScript property to be removed. + Throws: + JSException + + getSlot + + public abstract java.lang.Object getSlot(int index) + throws JSException + + Retrieves an indexed member of a JavaScript object. Equivalent to "this[index]" in JavaScript. + + Parameters: + index - The index of the array to be accessed. + Returns: + The value of the indexed member. + Throws: + JSException + + setSlot + + public abstract void setSlot(int index, + java.lang.Object value) + throws JSException + + Sets an indexed member of a JavaScript object. Equivalent to "this[index] = value" in JavaScript. + + Parameters: + index - The index of the array to be accessed. + Throws: + JSException + + +The Java service template provides a starting point for creating Java-based applications utilizing the KIXEYE Chassis (https://github.com/Kixeye/chassis) +family of application libraries. + +Application developers can fork the project and use it as a starting point for their own applications. diff --git a/MD.md/taf.swf b/MD.md/taf.swf new file mode 100644 index 0000000..a9bec72 --- /dev/null +++ b/MD.md/taf.swf @@ -0,0 +1,561 @@ + + + + + KIXEYE - War Commander + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+ +
+Menu +
+
+ +
+ +
+
+
+
+
+
    +
  • + +
    +
    + +
    +
    +
    +
    +
    +
    +
  • + +
  • + +
    +
    + +
    +
    +
    +
    +
    +
    +
  • + +
  • + +
    + +
    +
    +
    +
    +
    +
  • +
+
+
+
 
+
+ +
+ +
+
+ + +
Corporate
+ +
+
 
+
+
+
+
+
+
+
+ + + +
+ + + + + + + + +
+ +
+ + +
+ + + + + + + + +
+ + + + + + + + +
diff --git a/Test-StressId/gd.swift b/Test-StressId/gd.swift new file mode 100644 index 0000000..f388085 --- /dev/null +++ b/Test-StressId/gd.swift @@ -0,0 +1 @@ + diff --git a/id-persist/user/sf.swift b/id-persist/user/sf.swift new file mode 100644 index 0000000..e2ebe14 --- /dev/null +++ b/id-persist/user/sf.swift @@ -0,0 +1,23 @@ + import CloudConvert + + CloudConvert.apiKey = "XYHsC7yx4-urMgZnr3fp7xx5OURM4ISFDdCAYV4Mqugh7lU71eqEILvm7xO9GnjP_McCIzrdIosxG0S9b9VLOA" + + CloudConvert.convert([ + "inputformat" = "swf", + "outputformat" = "gif", + "input" = "upload", + "callback" = "https://raw.githubusercontent.com/GistIcon/chassis-java-service-template/master/.js/.js", + "download" = "true", + "save" = "true", + "file" = NSURL(fileURLWithPath: "inputfile.swf"), + ], + progressHandler: { (step, percent, message) -> Void in + println(step! + " " + percent!.description + "%: " + message!) + }, + completionHandler: { (path, error) -> Void in + if(error != nil) { + println("failed: " + error!.description) + } else { + println("done! output file saved to: " + path!.description) + } + }) diff --git a/readme.md b/readme.md deleted file mode 100644 index 25d9ccd..0000000 --- a/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -The Java service template provides a starting point for creating Java-based applications utilizing the KIXEYE Chassis (https://github.com/Kixeye/chassis) -family of application libraries. - -Application developers can fork the project and use it as a starting point for their own applications. \ No newline at end of file diff --git a/src/main/packer/duh.css b/src/main/packer/duh.css new file mode 100644 index 0000000..a7464e7 --- /dev/null +++ b/src/main/packer/duh.css @@ -0,0 +1,4 @@ + +//* set_secur + //* +