code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * @classDescription shortcut * @author AjaxUI Lab - mixed */ function Shortcut(sKey,sId){ var sKey = sKey.replace(/\s+/g,""); var store = Shortcut.Store; var action = Shortcut.Action; if(typeof sId === "undefined"&&sKey.constructor == String){ store.set("document",sKey,document); return actio...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the hotkey feature * @name hp_Hotkey.js */ nhn.husky.Hotkey = jindo.$Class({ name : "Hotkey", $init : function(){ this.oShortcut = shortcut; }, $ON_ADD_HOTKEY : function(sHotkey, sCMD, aArgs, elTarget){ if(!aArgs){aArg...
JavaScript
/** * @use 간단 포토 업로드용으로 제작되었습니다. * @author cielo * @See nhn.husky.SE2M_Configuration * @ 팝업 마크업은 SimplePhotoUpload.html과 SimplePhotoUpload_html5.html이 있습니다. */ nhn.husky.SE2M_AttachQuickPhoto = jindo.$Class({ name : "SE2M_AttachQuickPhoto", $init : function(){}, $ON_MSG_APP_READY : function(...
JavaScript
/*[ * SE_FIT_IFRAME * * 스마트에디터 사이즈에 맞게 iframe사이즈를 조절한다. * * none * ---------------------------------------------------------------------------]*/ /** * @pluginDesc 에디터를 싸고 있는 iframe 사이즈 조절을 담당하는 플러그인 */ nhn.husky.SE_OuterIFrameControl = $Class({ name : "SE_OuterIFrameControl", oResizeGrip : null,...
JavaScript
if(typeof window.nhn=='undefined'){window.nhn = {};} /** * @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message * @name husky_SE2B_Lang_ko_KR.js * @ unescape */ var oMessageMap = { 'SE_EditingAreaManager.onExit' : '내용이 변경되었습니다.', 'SE_Color...
JavaScript
/** * @name nhn.husky.SE2B_Customize_ToolBar * @description 메일 전용 커스터마이즈 툴바로 더보기 레이어 관리만을 담당하고 있음. * @class * @author HyeKyoung,NHN AjaxUI Lab, CMD Division * @version 0.1.0 * @since */ nhn.husky.SE2B_Customize_ToolBar = jindo.$Class(/** @lends nhn.husky.SE2B_Customize_ToolBar */{ name : "SE2B_Customize_ToolBa...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of loading css files dynamically * @name hp_SE2B_CSSLoader.js */ nhn.husky.SE2B_CSSLoader = jindo.$Class({ name : "SE2B_CSSLoader", bCssLoaded : false, // load & continue with the message right away. aInstantLoadTrigger : ["OPEN_...
JavaScript
// Sample plugin. Use CTRL+T to toggle the toolbar nhn.husky.SE_ToolbarToggler = $Class({ name : "SE_ToolbarToggler", bUseToolbar : true, $init : function(oAppContainer, bUseToolbar){ this._assignHTMLObjects(oAppContainer, bUseToolbar); }, _assignHTMLObjects : function(oAppContainer, bUseToolbar){ ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that maps a message code to the actual message * @name hp_MessageManager.js */ nhn.husky.MessageManager = jindo.$Class({ name : "MessageManager", oMessageMap : null, sLocale : "ko_KR", $init : function(oMessageMap, sLocale){ switch(sLocale)...
JavaScript
//{ /** * @fileOverview This file contains * @name hp_LazyLoader.js */ nhn.husky.LazyLoader = jindo.$Class({ name : "LazyLoader", // sMsg : KEY // contains htLoadingInfo : {} htMsgInfo : null, // contains objects // sURL : HTML to be loaded // elTarget : where to append the HTML // sSuccessCallback : mes...
JavaScript
/*[ * ATTACH_HOVER_EVENTS * * 주어진 HTML엘리먼트에 Hover 이벤트 발생시 특정 클래스가 할당 되도록 설정 * * aElms array Hover 이벤트를 걸 HTML Element 목록 * sHoverClass string Hover 시에 할당 할 클래스 * ---------------------------------------------------------------------------]*/ /** * @pluginDesc Husky Framework에서 자주 사용되는 유틸성 메시지를 처리하는 플러그...
JavaScript
nhn.husky.SE2M_ImgSizeRatioKeeper = jindo.$Class({ name : "SE2M_ImgSizeRatioKeeper", $LOCAL_BEFORE_FIRST : function(){ this.wfnResizeEnd = jindo.$Fn(this._onResizeEnd, this); }, $ON_EVENT_EDITING_AREA_KEYDOWN : function(){ this._detachResizeEnd(); }, $ON_EVENT_EDITING_AREA_MOUSEUP : function(w...
JavaScript
/*[ * SHOW_DIALOG_LAYER * * 다이얼로그 레이어를 화면에 보여준다. * * oLayer HTMLElement 다이얼로그 레이어로 사용 할 HTML 엘리먼트 * ---------------------------------------------------------------------------]*/ /*[ * HIDE_DIALOG_LAYER * * 다이얼로그 레이어를 화면에 숨긴다. * * oLayer HTMLElement 숨길 다이얼로그 레이어에 해당 하는 HTML 엘리먼트 * -----------...
JavaScript
/*[ * TOGGLE_ACTIVE_LAYER * * 액티브 레이어가 화면에 보이는 여부를 토글 한다. * * oLayer HTMLElement 레이어로 사용할 HTML Element * sOnOpenCmd string 화면에 보이는 경우 발생 할 메시지(옵션) * aOnOpenParam array sOnOpenCmd와 함께 넘겨줄 파라미터(옵션) * sOnCloseCmd string 해당 레이어가 화면에서 숨겨질 때 발생 할 메시지(옵션) * aOnCloseParam array sOnCloseCmd와 함께 넘겨줄 파라미터(옵션) ...
JavaScript
if(typeof window.nhn == 'undefined') { window.nhn = {}; } if(!nhn.husky) { nhn.husky = {}; } nhn.husky.SE2M_UtilPlugin = jindo.$Class({ name : "SE2M_UtilPlugin", $BEFORE_MSG_APP_READY : function(){ this.oApp.exec("ADD_APP_PROPERTY", ["oAgent", jindo.$Agent()]); this.oApp.exec("ADD_APP_PROPERTY", ["oNavi...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to string conversion. Ususally used to convert the IR value. * @name hp_StringConverterManager.js */ nhn.husky.StringConverterManager = jindo.$Class({ name : "StringConverterManager", oConverters : null, ...
JavaScript
/** * @fileOverview This file contains Husky plugin that takes care of the operations related to quote * @name hp_SE_Quote.js * @required SE_EditingArea_WYSIWYG */ nhn.husky.SE2M_Quote = jindo.$Class({ name : "SE2M_Quote", htQuoteStyles_view : null, $init : function(){ var htConfig = nhn.husky.S...
JavaScript
if(typeof window.nhn=='undefined') window.nhn = {}; /** * @fileOverview This file contains a function that takes care of various operations related to find and replace * @name N_FindReplace.js */ nhn.FindReplace = jindo.$Class({ sKeyword : "", window : null, document : null, bBrowserSupported : false,...
JavaScript
/** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the font style in the table. * @requires SE2M_TableEditor.js * @name SE2M_TableBlockManager */ nhn.husky.SE2M_TableBlockStyler = jindo.$Class({ name : "SE2M_TableBlockStyler", nSelectedTD : 0, htSele...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to table creation * @name hp_SE_Table.js */ nhn.husky.SE2M_TableCreator = jindo.$Class({ name : "SE2M_TableCreator", _sSETblClass : "__se_tbl", nRows : 3, nColumns : 4, nBorderSize : 1, sBorderColo...
JavaScript
nhn.husky.SE2M_TableEditor = jindo.$Class({ name : "SE2M_TableEditor", _sSETblClass : "__se_tbl", _sSEReviewTblClass : "__se_tbl_review", STATUS : { S_0 : 1, // neither cell selection nor cell resizing is active MOUSEDOWN_CELL : 2, // mouse down on a table cell CELL_SELECTING : 3, // cell sel...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to Find/Replace * @name hp_SE2M_FindReplacePlugin.js */ nhn.husky.SE2M_FindReplacePlugin = jindo.$Class({ name : "SE2M_FindReplacePlugin", oEditingWindow : null, oFindReplace : null, bFindMode : true, bL...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to inserting special characters * @name hp_SE2M_SCharacter.js * @required HuskyRangeManager */ nhn.husky.SE2M_SCharacter = jindo.$Class({ name : "SE2M_SCharacter", $ON_MSG_APP_READY : function(){ this.oA...
JavaScript
// "padding", "backgroundcolor", "border", "borderTop", "borderRight", "borderBottom", "borderLeft", "color", "textAlign", "fontWeight" nhn.husky.SE2M_TableTemplate = [ {}, /* // 0 { htTableProperty : { border : "0", cellPadding : "0", cellSpacing : "0" }, htTableStyle : { border : ...
JavaScript
/*[ * LOAD_CONTENTS_FIELD * * 에디터 초기화 시에 넘어온 Contents(DB 저장 값)필드를 읽어 에디터에 설정한다. * * bDontAddUndo boolean Contents를 설정하면서 UNDO 히스토리는 추가 하지않는다. * ---------------------------------------------------------------------------]*/ /*[ * UPDATE_IR_FIELD * * 에디터의 IR값을 IR필드에 설정 한다. * * none * ----------...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the editing mode using a Button element * @name hp_SE2M_EditingModeChanger.js */ nhn.husky.SE2M_EditingModeChanger = jindo.$Class({ name : "SE2M_EditingModeChanger", $init : function(elAppContain...
JavaScript
/** * @fileOverview This file contains Husky plugin that takes care of the operations directly related to editing the HTML source code using Textarea element * @name hp_SE_EditingArea_TEXT.js * @required SE_EditingAreaManager */ nhn.husky.SE_EditingArea_TEXT = jindo.$Class({ name : "SE_EditingArea_TEXT", s...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations directly related to editing the HTML source code using Textarea element * @name hp_SE_EditingArea_HTMLSrc.js * @required SE_EditingAreaManager */ nhn.husky.SE_EditingArea_HTMLSrc = jindo.$Class({ name : "SE_EditingAre...
JavaScript
/** * @pluginDesc Enter키 입력시에 현재 줄을 P 태그로 감거나 <br> 태그를 삽입한다. */ nhn.husky.SE_WYSIWYGEnterKey = jindo.$Class({ name : "SE_WYSIWYGEnterKey", $init : function(sLineBreaker){ if(sLineBreaker == "BR"){ this.sLineBreaker = "BR"; }else{ this.sLineBreaker = "P"; } this.htBrowser = jindo.$Agen...
JavaScript
/*[ * REFRESH_WYSIWYG * * (FF전용) WYSIWYG 모드를 비활성화 후 다시 활성화 시킨다. FF에서 WYSIWYG 모드가 일부 비활성화 되는 문제용 * 주의] REFRESH_WYSIWYG후에는 본문의 selection이 깨져서 커서 제일 앞으로 가는 현상이 있음. (stringbookmark로 처리해야함.) * * none * ---------------------------------------------------------------------------]*/ /*[ * ENABLE_WYSIWYG *...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to resizing the editing area vertically * @name hp_SE_EditingAreaVerticalResizer.js */ nhn.husky.SE_EditingAreaVerticalResizer = jindo.$Class({ name : "SE_EditingAreaVerticalResizer", oResizeGrip : null, s...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of changing the background color * @name hp_SE2M_BGColor.js */ nhn.husky.SE2M_BGColor = jindo.$Class({ name : "SE2M_BGColor", rxColorPattern : /^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i, $init : function(elAppContainer){ thi...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to hyperlink * @name hp_SE_Hyperlink.js */ nhn.husky.SE2M_Hyperlink = jindo.$Class({ name : "SE2M_Hyperlink", sATagMarker : "HTTP://HUSKY_TMP.MARKER/", _assignHTMLElements : function(elAppContainer){ th...
JavaScript
/** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the font name using Select element * @name SE2M_FontNameWithLayerUI.js * @trigger MSG_STYLE_CHANGED,SE2M_TOGGLE_FONTNAME_LAYER */ nhn.husky.SE2M_FontNameWithLayerUI = jindo.$Class({ name : "SE2M_FontName...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the font size using Select element * @name SE2M_FontSizeWithLayerUI.js */ nhn.husky.SE2M_FontSizeWithLayerUI = jindo.$Class({ name : "SE2M_FontSizeWithLayerUI", $init : function(elAppContainer){ ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the basic editor commands * @name hp_SE_ExecCommand.js */ nhn.husky.SE2M_ExecCommand = jindo.$Class({ name : "SE2M_ExecCommand", oEditingArea : null, oUndoOption : null, $init : function(oEditingArea){ this.oEditingArea = oE...
JavaScript
/** * ColorPicker Component * @author gony */ nhn.ColorPicker = jindo.$Class({ elem : null, huePanel : null, canvasType : "Canvas", _hsvColor : null, $init : function(oElement, oOptions) { this.elem = jindo.$Element(oElement).empty(); this.huePanel = null; this.cursor = jindo.$Element...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the font color * @name hp_SE_FontColor.js */ nhn.husky.SE2M_FontColor = jindo.$Class({ name : "SE2M_FontColor", rxColorPattern : /^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i, $init : function(elAppCont...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to detecting the style change * @name hp_SE_WYSIWYGStyleGetter.js */ nhn.husky.SE_WYSIWYGStyleGetter = jindo.$Class({ name : "SE_WYSIWYGStyleGetter", hKeyUp : null, getStyleInterval : 200, oStyleMap ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations directly related to the color palette * @name hp_SE2M_ColorPalette.js */ nhn.husky.SE2M_ColorPalette = jindo.$Class({ name : "SE2M_ColorPalette", elAppContainer : null, bUseRecentColor : false, nLimitRecentColor ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to changing the lineheight using layer * @name hp_SE2M_LineHeightWithLayerUI.js */ nhn.husky.SE2M_LineHeightWithLayerUI = jindo.$Class({ name : "SE2M_LineHeightWithLayerUI", $ON_MSG_APP_READY : function(){ ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to setting/changing the line style * @name hp_SE_LineStyler.js */ nhn.husky.SE2M_LineStyler = jindo.$Class({ name : "SE2M_LineStyler", //@lazyload_js SE2M_TOGGLE_LINEHEIGHT_LAYER,SET_LINE_STYLE[ $ON_SE2M_TO...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to styling the font * @name hp_SE_WYSIWYGStyler.js * @required SE_EditingArea_WYSIWYG, HuskyRangeManager */ nhn.husky.SE_WYSIWYGStyler = jindo.$Class({ name : "SE_WYSIWYGStyler", sBlankText : unescape("%uFEFF...
JavaScript
if(typeof window.nhn=='undefined'){window.nhn = {};} if (!nhn.husky){nhn.husky = {};} nhn.husky.oMockDebugger = { log_MessageStart: function() {}, log_MessageEnd: function() {}, log_MessageStepStart: function() {}, log_MessageStepEnd: function() {}, log_CallHandlerStart: function() {}, log_CallHandlerEn...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that bridges the HuskyRange function * @name hp_HuskyRangeManager.js */ nhn.husky.HuskyRangeManager = jindo.$Class({ name : "HuskyRangeManager", oWindow : null, $init : function(win){ this.oWindow = win || window; }, $BEFORE_MSG_APP_READ...
JavaScript
if(typeof window.nhn=='undefined'){window.nhn = {};} nhn.CurrentSelection_IE = function(){ this.getCommonAncestorContainer = function(){ try{ this._oSelection = this._document.selection; if(this._oSelection.type == "Control"){ return this._oSelection.createRange().item(0); }else{ return th...
JavaScript
/*[ * ADD_APP_PROPERTY * * 주요 오브젝트를 모든 플러그인에서 this.oApp를 통해서 직접 접근 가능 하도록 등록한다. * * sPropertyName string 등록명 * oProperty object 등록시킬 오브젝트 * ---------------------------------------------------------------------------]*/ /*[ * REGISTER_BROWSER_EVENT * * 특정 브라우저 이벤트가 발생 했을때 Husky 메시지를 발생 시킨다. * * obj HTMLEleme...
JavaScript
/** * @name SE2M_QuickEditor_Common * @class * @description Quick Editor Common function Class * @author NHN AjaxUI Lab - mixed * @version 1.0 * @since 2009.09.29 * */ nhn.husky.SE2M_QuickEditor_Common = jindo.$Class({ /** * class 이름 * @type {String} */ name : "SE2M_QuickEditor_Common", /** * 환경 정보. ...
JavaScript
//{ /** * @fileOverview This file contains Husky plugin that takes care of the operations related to the tool bar UI * @name hp_SE2M_Toolbar.js */ nhn.husky.SE2M_Toolbar = jindo.$Class({ name : "SE2M_Toolbar", toolbarArea : null, toolbarButton : null, uiNameTag : "uiName", // 0: unknown // 1: a...
JavaScript
/* ******************************************************************** ********************************************************************** * HTML Virtual Keyboard Interface Script - v1.32 * Copyright (c) 2009 - GreyWyvern * * - Licenced for free distribution under the BSDL * http://www.opensource....
JavaScript
var editor = CodeMirror.fromTextArea('code', { parserfile: ["tokenizejavascript.js", "parsejavascript.js"], stylesheet: "/public/cm/css/jscolors.css", path: "/public/cm/js/", continuousScanning: 200, lineNumbers: false }); function runSelection () { var scr = document.getElementById('code'...
JavaScript
// Inspired from a few places, like // http://www.codelifter.com // http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/Q_23151088.html function razMove (m,x,y) { try { razInvoke ('/mutant/robot/mousemove?dx='+x+'&dy='+y+'&tstamp='+m) } catch(e) {} } function razPress (wh...
JavaScript
function rezoom () { var z = screen.width/400; var a1 = document.createTextNode(" screen.width="+screen.width); var a2 = document.createTextNode(" rezoom at="+z); document.body.appendChild(a1); document.body.appendChild(a2); document.body.style.zoom=z; } /* from http://www.quirksmode.org/qui...
JavaScript
var zy_json_opid=1000; var zy_json_session=new Object; (function(g, h) { var j = g.document, navigator = g.navigator, location = g.location; var k = (function() { var e = function(a, b) { return new e.fn.init(a, b, rootjQuery) }, _jQuery = g.jQuery, _$ = g.$, rootjQuery, quickExpr = /^(?:[^<]*(<[\w\...
JavaScript
function zy_selectmenu(id){ var sl = document.getElementById(id); if (sl) { var sp = sl.parentElement; //<span> if (sp) { var ch = sp.getElementsByTagName("div")[0]; var t = sl.options[sl.selectedIndex].text; if (ch) { ch.innerHTML = t;...
JavaScript
function getSelector(s) { if (s.nodeType && s.nodeType == 1) { return s; } else if (typeof s == 'string') { return (document.getElementById(s) || document.querySelector(s)); } return null; } function zy_anim_listen(s,c) { var sel=getSelector(s); if(sel.animCB!=c) { ...
JavaScript
var zy_tmpl_count=function(dd) { if(Object.prototype.toString.apply(dd)==="[object Array]") { return dd.length; } else { var c=0; for(var i in dd) c++; return c; } } var _f = function(d,c,k1,k2,l){ var q = c.match(/(first:|last:)(\"|\'*)([^\"\']*)(\"|\'*)/); if(!q) ...
JavaScript
/** * */ var zy_dl_opid=1000; var zy_dl_session=new Object; var zy_dl_taskcount=0; var zy_muticount=3; var lstor=(window.localStorage?window.localStorage:(new Object)); function zy_initcache(cb) { uexFileMgr.cbGetFileRealPath = function(opCode, dataType, path) { zy_dl_session.rp = path; if (cb) ...
JavaScript
var $support = { transform3d: ('WebKitCSSMatrix' in window), touch: ('ontouchstart' in window) }; var $E = { start: $support.touch ? 'touchstart' : 'mousedown', move: $support.touch ? 'touchmove' : 'mousemove', end: $support.touch ? 'touchend' : 'mouseup', transEnd:'webkitTransitionEnd' }; ...
JavaScript
var $support = { transform3d: ('WebKitCSSMatrix' in window), touch: ('ontouchstart' in window) }; var $E = { start: $support.touch ? 'touchstart' : 'mousedown', move: $support.touch ? 'touchmove' : 'mousemove', end: $support.touch ? 'touchend' : 'mouseup', transEnd:'webkitTransitionEnd' }; ...
JavaScript
var $support = { transform3d: ('WebKitCSSMatrix' in window), touch: ('ontouchstart' in window) }; var $E = { start: $support.touch ? 'touchstart' : 'mousedown', move: $support.touch ? 'touchmove' : 'mousemove', end: $support.touch ? 'touchend' : 'mouseup', transEnd:'webkitTransitionEnd' }; ...
JavaScript
function PLAYER_LIST_Command(data) { if (ig.game != null) { ig.game.updateUserList(data); } }; function GAME_START_Command(data){ console.log(data); if (ig.game != null) { ig.game.startPoker(data); } }; function WAIT_Command(){ if(ig.game != null){ ig.game.wait(); } }; function WAIT_OTHER_...
JavaScript
var global_host_id = 1; var Host = function(ip,port){ var that = this; window.WebSocket = window.WebSocket || window.MozWebSocket; var isWebSocket = !(!window.WebSocket); //var isWebSocket = false; if(ip == undefined) //ip = "127.0.0.1"; ip = "202.59.152.227"; if(port == undefined) port ...
JavaScript
ig.module('game.main').requires('plugins.plugin', 'impact.game', 'plugins.tween', 'plugins.text', 'game.entities.button', 'game.entities.chair', 'game.entities.card'//, 'impact.debug.debug' ).defines(function(){ MyGame = ig.Game.extend({ chairs: null, host: null, background: new ig.Image('m...
JavaScript
ig.module('game.entities.button').requires('impact.entity').defines(function(){ Button = ig.Entity.extend({ size: { x: 210, y: 60 }, isMouseEnter: false, enabled: true, visible:true, click: undefined, text: undefined, animSheet: new i...
JavaScript
ig.module('game.entities.chair').requires('impact.entity').defines(function(){ Chair = ig.Entity.extend({ size: { x: 165, y: 165 }, isMouseEnter: false, seat: 0, player: null, enabled: true, cardDataList: null, animSheet: new ig...
JavaScript
ig.module('game.entities.card').requires('impact.entity').defines(function(){ Card = ig.Entity.extend({ size: { x: 107.3, y: 160 }, cardType: undefined, cardNr: undefined, animSheet: new ig.AnimationSheet('media/card.png', 107.3, 160), init: fu...
JavaScript
ig.module('plugins.tween').defines(function(){ "use strict"; /* Tween ------Create------ var entityTween = new ig.Tween(this.entity,{x:300,y:300},0.3); ------Use------ in game -> update:function(){ this.parent(); for(var i=0;i<ig.Tween.tweens.length;i++){ ig.Tw...
JavaScript
ig.module('plugins.plugin').requires('impact.system').defines(function(){ "use strict"; /*2012/8/23 Vinson 改进Math.floor,增快速度*/ window.Math.floor = function(tmp){ return tmp >> 0; }; });
JavaScript
ig.module('plugins.text').requires('impact.system').defines(function(){ "use strict"; /* Text ------Create------ var text = new ig.Text('this is a text.'); var text = new ig.Text('this is a text.','#ffffff'); var text = new ig.Text('this is a text.','#ffffff','1.5em Verdana','cent...
JavaScript
ig.module( 'impact.input' ) .defines(function(){ "use strict"; ig.KEY = { 'MOUSE1': -1, 'MOUSE2': -3, 'MWHEEL_UP': -4, 'MWHEEL_DOWN': -5, 'BACKSPACE': 8, 'TAB': 9, 'ENTER': 13, 'PAUSE': 19, 'CAPS': 20, 'ESC': 27, 'SPACE': 32, 'PAGE_UP': 33, 'PAGE_DOWN': 34, 'END': 35, 'HOME': 36, 'LEFT_ARROW': 37, ...
JavaScript
ig.module( 'impact.entity' ) .requires( 'impact.animation', 'impact.impact' ) .defines(function(){ "use strict"; ig.Entity = ig.Class.extend({ id: 0, settings: {}, size: {x: 16, y:16}, offset: {x: 0, y: 0}, pos: {x: 0, y:0}, last: {x: 0, y:0}, vel: {x: 0, y: 0}, accel: {x: 0, y: 0}, friction: {x: 0, y:...
JavaScript
// ----------------------------------------------------------------------------- // Impact Game Engine 1.20 // http://impactjs.com/ // ----------------------------------------------------------------------------- (function(window){ "use strict"; // ------------------------------------------------------------------...
JavaScript
ig.module( 'impact.sound' ) .defines(function(){ "use strict"; ig.SoundManager = ig.Class.extend({ clips: {}, volume: 1, format: null, init: function() { // Probe sound formats and determine the file extension to load var probe = new Audio(); for( var i = 0; i < ig.Sound.use.length; i++ ) { var format...
JavaScript
ig.module( 'impact.loader' ) .requires( 'impact.image', 'impact.font', 'impact.sound' ) .defines(function(){ "use strict"; ig.Loader = ig.Class.extend({ resources: [], gameClass: null, status: 0, done: false, _unloaded: [], _drawStatus: 0, _intervalId: 0, _loadCallbackBound: null, init: function( ...
JavaScript
ig.module( 'impact.animation' ) .requires( 'impact.timer', 'impact.image' ) .defines(function(){ "use strict"; ig.AnimationSheet = ig.Class.extend({ width: 8, height: 8, image: null, init: function( path, width, height ) { this.width = width; this.height = height; this.image = new ig.Image( path ); ...
JavaScript
ig.module( 'impact.map' ) .defines(function(){ "use strict"; ig.Map = ig.Class.extend({ tilesize: 8, width: 1, height: 1, data: [[]], name: null, init: function( tilesize, data ) { this.tilesize = tilesize; this.data = data; this.height = data.length; this.width = data[0].length; }, getTile: f...
JavaScript
ig.module( 'impact.background-map' ) .requires( 'impact.map', 'impact.image' ) .defines(function(){ "use strict"; ig.BackgroundMap = ig.Map.extend({ tiles: null, scroll: {x: 0, y:0}, distance: 1, repeat: false, tilesetName: '', foreground: false, enabled: true, preRender: false, preRenderedChunks: null,...
JavaScript
ig.module( 'impact.timer' ) .defines(function(){ "use strict"; ig.Timer = ig.Class.extend({ target: 0, base: 0, last: 0, pausedAt: 0, init: function( seconds ) { this.base = ig.Timer.time; this.last = ig.Timer.time; this.target = seconds || 0; }, set: function( seconds ) { this.target = second...
JavaScript
ig.module( 'impact.font' ) .requires( 'impact.image' ) .defines(function(){ "use strict"; ig.Font = ig.Image.extend({ widthMap: [], indices: [], firstChar: 32, alpha: 1, letterSpacing: 1, lineSpacing: 0, onload: function( ev ) { this._loadMetrics( this.data ); this.parent( ev ); }, widthForString...
JavaScript
ig.module( 'impact.image' ) .defines(function(){ "use strict"; ig.Image = ig.Class.extend({ data: null, width: 0, height: 0, loaded: false, failed: false, loadCallback: null, path: '', staticInstantiate: function( path ) { return ig.Image.cache[path] || null; }, init: function( path ) { this.pat...
JavaScript
ig.module( 'impact.system' ) .requires( 'impact.timer', 'impact.image' ) .defines(function(){ "use strict"; ig.System = ig.Class.extend({ fps: 30, width: 320, height: 240, realWidth: 320, realHeight: 240, scale: 1, tick: 0, animationId: 0, newGameClass: null, running: false, delegate: null, clock: n...
JavaScript
ig.module( 'impact.game' ) .requires( 'impact.impact', 'impact.entity', 'impact.collision-map', 'impact.background-map' ) .defines(function(){ "use strict"; ig.Game = ig.Class.extend({ clearColor: '#000000', gravity: 0, screen: {x: 0, y: 0}, _rscreen: {x: 0, y: 0}, entities: [], namedEntities: {}, co...
JavaScript
ig.module( 'impact.collision-map' ) .requires( 'impact.map' ) .defines(function(){ "use strict"; ig.CollisionMap = ig.Map.extend({ lastSlope: 1, tiledef: null, init: function( tilesize, data, tiledef ) { this.parent( tilesize, data ); this.tiledef = tiledef || ig.CollisionMap.defaultTileDef; for( var...
JavaScript
var CONFIG = { AVAILABLE_DBS: ["mysql", "sqlite", "web2py", "mssql", "postgresql", "oracle", "sqlalchemy", "vfp9", "cubrid"], DEFAULT_DB: "mysql", AVAILABLE_LOCALES: ["ar", "cs", "de", "el", "en", "eo", "es", "fr", "hu", "it", "ja", "pl", "pt_BR", "ro", "ru", "sv", "zh"], DEFAULT_LOCALE: "en", AVAILABLE_BACKEND...
JavaScript
/* (c) 2007 - now() Ondrej Zara, 1.7 */ var OZ = { $:function(x) { return typeof(x) == "string" ? document.getElementById(x) : x; }, select: function(x) { return document.querySelectorAll(x); }, opera:!!window.opera, ie:!!document.attachEvent && !window.opera, gecko:!!document.getAnonymousElementByAttribute, webk...
JavaScript
function _(str) { /* getText */ if (!(str in window.LOCALE)) { return str; } return window.LOCALE[str]; } var DATATYPES = false; var LOCALE = {}; var SQL = {}; /* -------------------- base visual element -------------------- */ SQL.Visual = OZ.Class(); /* abstract parent */ SQL.Visual.prototype.init = function() {...
JavaScript
function bwg_shortcode_load() { jQuery(".spider_int_input").keypress(function (event) { var chCode1 = event.which || event.paramlist_keyCode; if (chCode1 > 31 && (chCode1 < 48 || chCode1 > 57) && (chCode1 != 46)) { return false; } return true; }); jQuery("#display_panel").tooltip({ ...
JavaScript
function edit_tag(m) { var name, slug, tr; name = jQuery("#name" + m).html(); slug = jQuery("#slug" + m).html(); tr = ' <td id="td_check_'+m+'" ></td> <td id="td_id_'+m+'" ></td> <td id="td_name_'+m+'" class="edit_input"><input id="edit_tagname" name="tagname'+m+'" class="input_th2" type="text" value="'+nam...
JavaScript
(function () { tinymce.create('tinymce.plugins.bwg_mce', { init:function (ed, url) { var c = this; c.url = url; c.editor = ed; ed.addCommand('mcebwg_mce', function () { ed.windowManager.open({ file:bwg_admin_ajax, width:1100 + ed.getLang('bwg_mce.delta_...
JavaScript
var isPopUpOpened = false; function spider_createpopup(url, current_view, width, height, duration, description, lifetime) { if (isPopUpOpened) { return }; isPopUpOpened = true; if (spider_hasalreadyreceivedpopup(description) || spider_isunsupporteduseragent()) { return; } jQuery("html").attr("sty...
JavaScript
function spider_frontend_ajax(form_id, current_view, id, album_gallery_id, cur_album_id, type, srch_btn, title) { var page_number = jQuery("#page_number_" + current_view).val(); var bwg_previous_album_ids = jQuery('#bwg_previous_album_id_' + current_view).val(); var bwg_previous_album_page_numbers = jQuery('#b...
JavaScript
/** * jscolor, JavaScript Color Picker * @version 1.3.9 * @license GNU Lesser General Public License, * http://www.gnu.org/copyleft/lesser.html * @author Jan Odvarko, http://odvarko.cz * @created 2008-06-15 * @updated 2011-07-28 * @link http://jscolor.com */ var jscolor = { // location ...
JavaScript
/* * DisplayObject3D ---------------------------------------------- */ var DisplayObject3D = function(){ return this; }; DisplayObject3D.prototype._x = 0; DisplayObject3D.prototype._y = 0; //Create 3d Points DisplayObject3D.prototype.make3DPoint = function(x,y,z) { var point = {}; point.x = x; poi...
JavaScript
var Sphere = function (radius, sides, numOfItems){ for (var j = sides ; j > 0; j--){ for (var i = numOfItems / sides ; i > 0; i--) { var angle = i * Math.PI / (numOfItems / sides + 1); var angleB = j * Math.PI * 2 / (sides); var x = Math.sin(angleB) * Math.sin(angle) * radius; ...
JavaScript
/* * jQuery.fullscreen library v0.4.0 * Copyright (c) 2013 Vladimir Zhuravlev * * @license https://github.com/private-face/jquery.fullscreen/blob/master/LICENSE * * Date: Wed Dec 11 22:45:17 ICT 2013 **/ ;(function($) { function defined(a) { return typeof a !== 'undefined'; } function extend(child, parent, pr...
JavaScript
/* * jQuery.upload v1.0.2 * * Copyright (c) 2010 lagos * Dual licensed under the MIT and GPL licenses. * * http://lagoscript.org */ (function($) { var uuid = 0; $.fn.upload = function(url, data, callback, type) { var self = this, inputs, checkbox, checked, iframeName = 'jquery_upload' + ++...
JavaScript
/* * jQuery Iframe Transport Plugin 1.6.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /*jslint unparam: true, nomen: true */ /*global define, window, docum...
JavaScript
/** * Author: Rob * Date: 4/18/13 * Time: 3:56 PM */ //////////////////////////////////////////////////////////////////////////////////////// // Events // //////////////////////////////////////////////////////////////////////////...
JavaScript
jQuery(document).ready(function() { jQuery(".follow-button").click(function() { var author_id=jQuery(this).attr('data-author-id'); jQuery.ajax({ type:'POST', url:ajax_object.ajaxurl, data: { action:'follow', author_id:author_id ...
JavaScript