code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
// Minimal framing needed to use CodeMirror-style parsers to highlight
// code. Load this along with tokenize.js, stringstream.js, and your
// parser. Then call highlightText, passing a string as the first
// argument, and as the second argument either a callback function
// that will be called with an array of SPAN no... | JavaScript |
/**
* Test Harness for CodeMirror
* JS-unit compatible tests here. The two available assertions are
* assertEquals (strict equality) and assertEquivalent (looser equivalency).
*
* 'editor' is a global object for the CodeMirror editor shared between all
* tests. After manipulating it in each test, try to restore... | JavaScript |
/* This file defines an XML parser, with a few kludges to make it
* useable for HTML. autoSelfClosers defines a set of tag names that
* are expected to not have a closing tag, and doNotIndent specifies
* the tags inside of which no indentation should happen (see Config
* object). These can be disabled by passin... | JavaScript |
/* String streams are the things fed to parsers (which can feed them
* to a tokenizer if they want). They provide peek and next methods
* for looking at the current character (next 'consumes' this
* character, peek does not), and a get method for retrieving all the
* text that was consumed since the last time get w... | JavaScript |
/* CodeMirror main module (http://codemirror.net/)
*
* Implements the CodeMirror constructor and prototype, which take care
* of initializing the editor frame, and providing the outside interface.
*/
// The CodeMirrorConfig object is used to specify a default
// configuration. If you specify such an object before ... | JavaScript |
/* Parse function for JavaScript. Makes use of the tokenizer from
* tokenizejavascript.js. Note that your parsers do not have to be
* this complicated -- if you don't want to recognize local variables,
* in many languages it is enough to just look for braces, semicolons,
* parentheses, etc, and know when you are in... | JavaScript |
/**
* Storage and control for undo information within a CodeMirror
* editor. 'Why on earth is such a complicated mess required for
* that?', I hear you ask. The goal, in implementing this, was to make
* the complexity of storing and reverting undo information depend
* only on the size of the edited or restored con... | JavaScript |
var DummyParser = Editor.Parser = (function() {
function tokenizeDummy(source) {
while (!source.endOfLine()) source.next();
return "text";
}
function parseDummy(source) {
function indentTo(n) {return function() {return n;}}
source = tokenizer(source, tokenizeDummy);
var space = 0;
var ite... | JavaScript |
/* A few useful utility functions. */
// Capture a method on an object.
function method(obj, name) {
return function() {obj[name].apply(obj, arguments);};
}
// The value used to signal the end of a sequence in iterators.
var StopIteration = {toString: function() {return "StopIteration"}};
// Apply a function to ea... | JavaScript |
/* Functionality for finding, storing, and restoring selections
*
* This does not provide a generic API, just the minimal functionality
* required by the CodeMirror system.
*/
// Namespace object.
var select = {};
(function() {
select.ie_selection = document.selection && document.selection.createRangeCollection... | JavaScript |
/* Simple parser for CSS */
var CSSParser = Editor.Parser = (function() {
var tokenizeCSS = (function() {
function normal(source, setState) {
var ch = source.next();
if (ch == "@") {
source.nextWhileMatches(/\w/);
return "css-at";
}
else if (ch == "/" && source.equals("*")... | JavaScript |
// A framework for simple tokenizers. Takes care of newlines and
// white-space, and of getting the text from the source stream into
// the token object. A state is a function of two arguments -- a
// string stream and a setState function. The second can be used to
// change the tokenizer's state, and can be ignored fo... | JavaScript |
var HTMLMixedParser = Editor.Parser = (function() {
// tags that trigger seperate parsers
var triggers = {
"script": "JSParser",
"style": "CSSParser"
};
function checkDependencies() {
var parsers = ['XMLParser'];
for (var p in triggers) parsers.push(triggers[p]);
for (var i in parsers) {
... | JavaScript |
/* Demonstration of embedding CodeMirror in a bigger application. The
* interface defined here is a mess of prompts and confirms, and
* should probably not be used in a real project.
*/
function MirrorFrame(place, options) {
this.home = document.createElement("div");
if (place.appendChild)
place.appendChild... | JavaScript |
/* The Editor object manages the content of the editable frame. It
* catches events, colours nodes, and indents lines. This file also
* holds some functions for transforming arbitrary DOM structures into
* plain sequences of <span> and <br> elements
*/
var internetExplorer = document.selection && window.ActiveXObj... | JavaScript |
/**
* Base class of Drag
* @example:
* Drag.init( header_element, element );
*/
var Drag = {
// 对这个element的引用,一次只能拖拽一个Element
obj: null ,
/**
* @param: elementHeader used to drag..
* @param: element used to follow..
*/
init: function(elementHeader, element) {
// 将 start 绑定到 onmousedown 事... | JavaScript |
/*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Ba... | JavaScript |
(function($) {
/*
jquery.twitter.js v1.0
Last updated: 26 October 2008
Created by Damien du Toit
http://coda.co.za/blog/2008/10/26/jquery-plugin-for-twitter
Licensed under a Creative Commons Attribution-Non-Commercial 3.0 Unported License
http://creativecommons.org/licenses/by-nc/3.0/
*/
$... | JavaScript |
/* ------------------------------------------------------------------------
s3Slider
Developped By: Boban Karišik -> http://www.serie3.info/
CSS Help: Mészáros Róbert -> http://www.perspectived.com/
Version: 1.0
Copyright: Feel free to redistribute the script/modify it, as
long as you ... | JavaScript |
/**
* @author Stéphane Roucheray
* @extends jquery
*/
$.fn.infiniteCarousel = function () {
function repeat(str, num) {
return new Array( num + 1 ).join( str );
}
return this.each(function () {
var $wrapper = $('> div', this).css('overflow', 'hidden'),
$slider = $wrapper.find... | JavaScript |
function check_room_type_frm()
{
var ErrorMsg = "Following fields must be corrected \n\n";
var Error = 0;
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var regex = new RegExp("|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i");
if(document.getElementById('room_type_na... | JavaScript |
function callAjax(elementID,PageUrl){
//alert("On called ajax:"+PageUrl+elementID);
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
http.abort();
http.open("GET", PageUrl, true);
http... | JavaScript |
function chk_customer(field){
if(document.getElementById('chk').checked == true){
checkAll(field)
} else {
uncheckAll(field)
}
}
function checkAll(field){
for (i = 0; i < field.length; i++)
field[i].checked = true ;
}
function uncheckAll(field){
for (i = 0; i < field.length; i++)
field[i].checked ... | JavaScript |
function callAjax(elementID,PageUrl){
//alert("On called ajax:"+PageUrl+elementID);
var http = false;
if(navigator.appName == "Microsoft Internet Explorer") {
http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
http = new XMLHttpRequest();
}
http.abort();
http.open("GET", PageUrl, true);
http... | JavaScript |
function settings_validtion()
{
var ErrorMsg = "Following fields must be corrected \n\n";
var Error = 0;
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
var regex = new RegExp("|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i");
if(document.getElementById('fieldname').valu... | JavaScript |
jQuery(document).ready(function() {
//select all the a tag with name equal to modal
jQuery('a[name=modal2]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
//Get the A tag
var id = jQuery(this).attr('href');
//Get the screen height and width
var maskHeight = jQuery(do... | JavaScript |
function side_bar_validation(){
var Error = 0;
var ErrorMsg = "Following fields must be corrected \n\n";
if(document.getElementById('check_in_date').value == 'Check-In')
{
ErrorMsg = ErrorMsg + "Please Enter check in date \n\n";
Error = 1;
}if(document.getElementById('check_out_date').value == 'Check-Ou... | JavaScript |
/**
*
* Delay
*
* Creates a way to delay events
* Dependencies: jQuery
*
*/
(function ($) {
$.fn.delay = function(time,func){
return this.each(function(){
setTimeout(func,time);
});
};
})(jQuery);
/**
*
* Center AJAX
*
* Creates a way to center the AJAX message
* Depe... | JavaScript |
/**
*
* Color picker
* Author: Stefan Petre www.eyecon.ro
*
* Dependencies: jQuery
*
*/
(function ($) {
var ColorPicker = function () {
var
ids = {},
inAction,
charMin = 65,
visible,
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpic... | JavaScript |
/**
* TableDnD plug-in for JQuery, allows you to drag and drop table rows
* You can set up various options to control how the system will work
* Copyright (c) Denis Howlett <denish@isocra.com>
* Licensed like jQuery, see http://docs.jquery.com/License.
*
* Configuration options:
*
* onDragStyle
* This is ... | JavaScript |
var $cwidget = jQuery.noConflict();
$cwidget(document).ready(function(){
//global vars
var contact_widget_frm = $cwidget("#contact_widget_frm");
var your_name = $cwidget("#widget_your-name");
var your_email = $cwidget("#widget_your-email");
var your_subject = $cwidget("#widget_your-subject");
var your_me... | JavaScript |
jQuery.noConflict();
(function($) {
$(function() {
/*** Dropdown menu ***/
var timeout = 200;
var closetimer = 0;
var ddmenuitem = 0;
function dd_open() {
dd_canceltimer();
dd_close();
var liwidth = $(this).width();... | JavaScript |
/*
* jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* Copyright (c) 2007 George Smith
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*/
//... | JavaScript |
/*!
* Galleria Classic Theme
* http://galleria.aino.se
*
* Copyright (c) 2010, Aino
* Licensed under the MIT license.
*/
(function($) {
Galleria.addTheme({
name: 'classic',
author: 'Galleria',
version: '1.2',
css: 'galleria.classic.css',
defaults: {
transition: 'slide... | JavaScript |
/*!
* Galleria v 1.1.95 2010-08-06
* http://galleria.aino.se
*
* Copyright (c) 2010, Aino
* Licensed under the MIT license.
*/
(function() {
var initializing = false,
fnTest = /xyz/.test(function(){xyz;}) ? /\b__super\b/ : /.*/,
Class = function(){},
window = this;
Class.extend = function(prop) {
... | JavaScript |
var $c = jQuery.noConflict();
$c(document).ready(function(){
//global vars
var enquiryfrm = $c("#contact_frm");
var your_name = $c("#your-name");
var your_email = $c("#your-email");
var your_subject = $c("#your-subject");
var your_message = $c("#your-message");
var your_name_Info = $c("#your_name_In... | JavaScript |
$(function(){
$('span.star-btn').each(function(){
var span = $(this);
var rating = $(this).next('input').val();
if (rating) {
span.css('background-position', (-16 * (5 - rating)) + 'px 0');
}
});
$('span.star-btn a').each(function(){
var span... | JavaScript |
// 定义heart类
function Heart(){
this.init();
}
// 定义heart类的draw函数
Heart.prototype={
init:function(){
Heart.finished = false;
},
calPositon:function(startx, starty, radius, addArch, garden){
// 初始化弧度系数,0-2
var startArch = 0;
// 执行定时计算,frequency是刷新频率
var a = setInterval(function() {
// 计算出的当前心形坐标
var ... | JavaScript |
var $window = $(window)
var clientWidth = $(window).width();
var clientHeight = $(window).height();
$(window).resize(function() {
var b = $(window).width();
var a = $(window).height();
if (b != clientWidth && a != clientHeight) {
location.replace(location)
}
});
// 初始化时候做的
$(function() {
drawLoveHeartLeft();
... | JavaScript |
function Vector(a, b) {
this.x = a;
this.y = b
}
Vector.prototype = {
rotate: function(b) {
var a = this.x;
var c = this.y;
this.x = Math.cos(b) * a - Math.sin(b) * c;
this.y = Math.sin(b) * a + Math.cos(b) * c;
return this
},
mult: function(a) {
this.x *= a;
this.y *= a;
return this
},
clone: fu... | JavaScript |
var tinyMCEImageList = new Array(
// Name, URL
["Logo 1", "logo.jpg"],
["Logo 2 Over", "logo_over.jpg"]
);
| JavaScript |
// new edit toolbar used with permission
// by Alex King
// http://www.alexking.org/
var edButtons = new Array(), edLinks = new Array(), edOpenTags = new Array(), now = new Date(), datetime;
function edButton(id, display, tagStart, tagEnd, access, open) {
this.id = id; // used to name the toolbar button
this.dis... | JavaScript |
/*
* jQuery Form Plugin
* version: 2.12 (06/07/2008)
* @requires jQuery v1.2.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
... | JavaScript |
// utility functions
function convertEntities(o) {
var c, v;
c = function(s) {
if (/&[^;]+;/.test(s)) {
var e = document.createElement("div");
e.innerHTML = s;
return !e.firstChild ? s : e.firstChild.nodeValue;
}
return s;
}
if ( typeof o === 'string' ) {
return c(o);
} else if ( typeof o === 'ob... | JavaScript |
/*!
* jQuery blockUI plugin
* Version 2.31 (06-JAN-2010)
* @requires jQuery v1.2.3 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2008 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/lic... | JavaScript |
jQuery(document).ready(function($){
var h = wpCookies.getHash('TinyMCE_content_size');
if ( getUserSetting( 'editor' ) == 'html' ) {
if ( h )
$('#content').css('height', h.ch - 15 + 'px');
} else {
if ( typeof tinyMCE != 'object' ) {
$('#content').css('color', '#000');
} else {
$('#quic... | JavaScript |
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
/**
* Create a cookie with the given name and value and other optional parameters.
*
* @examp... | JavaScript |
/**
* AJAX Upload ( http://valums.com/ajax-upload/ )
* Copyright (c) Andris Valums
* Licensed under the MIT license ( http://valums.com/mit-license/ )
* Thanks to Gary Haran, David Mark, Corey Burns and others for contributions
*/
(function () {
/* global window */
/* jslint browser: true, devel: true, u... | JavaScript |
<!--//--><![CDATA[//><!--
sfFocus = function() {
var sfEls = document.getElementsByTagName("INPUT");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onfocus=function() {
this.className+=" sffocus";
}
sfEls[i].onblur=function() {
this.className=this.className.replace(new RegExp(" sffocus\\b"), "");... | JavaScript |
/****************************************************************
* *
* curvyCorners *
* ------------ *
* ... | JavaScript |
<!--//--><![CDATA[//><!--
sfFocus = function() {
var sfEls = document.getElementsByTagName("INPUT");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onfocus=function() {
this.className+=" sffocus";
}
sfEls[i].onblur=function() {
this.className=this.className.replace(new RegExp(" sffocus\\b"), "");... | JavaScript |
/****************************************************************
* *
* curvyCorners *
* ------------ *
* ... | JavaScript |
///#source 1 1 /Scripts/MetroJs/src/js/init.js
/*!
* Metro JS for jQuery
* http://drewgreenwell.com/
* For details and usage info see: http://drewgreenwell.com/projects/metrojs
Copyright (C) 2012, Drew Greenwell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software an... | JavaScript |
// jQuery.event.swipe
// 0.5
// Stephen Band
// Dependencies
// jQuery.event.move 1.2
// One of swipeleft, swiperight, swipeup or swipedown is triggered on
// moveend, when the move has covered a threshold ratio of the dimension
// of the target node, or has gone really fast. Threshold and velocity
// sensitivity cha... | JavaScript |
// jquery.event.move
//
// 1.3.1
//
// Stephen Band
//
// Triggers 'movestart', 'move' and 'moveend' events after
// mousemoves following a mousedown cross a distance threshold,
// similar to the native 'dragstart', 'drag' and 'dragend' events.
// Move events are throttled to animation frames. Move event objects
// hav... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Composite <ukjinplant@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
********************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* Arabic Translation By ... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
************************... | JavaScript |
$(document).ready(function () {
SyntaxHighlighter.autoloader(
'js jscript javascript /Scripts/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js',
'csharp c# /Scripts/syntaxhighlighter_3.0.83/scripts/shBrushCSharp.js',
'xml xhtml html /Scr... | JavaScript |
/*!
* jQuery Form Plugin
* version: 2.45 (09-AUG-2010)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/... | JavaScript |
Date.prototype.format = function (format) {
/*
* eg:format="YYYY-MM-dd hh:mm:ss";
*/
var o = {
"M+": this.getMonth() + 1, //month
"d+": this.getDate(), //day
"h+": this.getHours(), //hour
"m+": this.getMinutes(), //minute
"s+": this.getSeconds()... | JavaScript |
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') {
options = options || {};
if (value === null) {
value = '';
options = $.extend({}, options);
options.expires = -1;
}
var expires = '';
if (options.e... | JavaScript |
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/SyntaxHighlighter
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
*
* @version
* 3.0.83 (July 02 2010)
*
* @copyright
* Copyright (C) 2004-2010 Alex Gorbatchev.... | JavaScript |
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
... | JavaScript |
function code_favorites_init(css_rules){
css_rules = css_rules || "pre[name=code]";
$$(css_rules).each(function(pre){
var sh_bar_tools = pre.previous().down(".tools");
var favorite_link = ' <a href="javascript:void()" title="收藏这段代码" onclick="code_favorites_do_favorite(this);return false;... | JavaScript |
function open_window(url) {
function o(){
if(!window.open(url,'iteye',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(screen.width-440)/2,',top=',(screen.height-430)/2].join('')))
window.location.href = url;
}
if(/Firefox/.test(navigator.userAgent)) {
setTimeout(o,0);
} else {
o... | JavaScript |
/*
*
* This code is data acquisition code for www.linezing.com web traffic analysis platform.
* www.linezing.com is Taobao's website.
*/
function lz_encode(str)
{
var e = "", i = 0;
for(i=0;i<str.length;i++) {
if(str.charCodeAt(i)>=0&&str.charCodeAt(i)<=255) {
e = e + escape(str.charAt(i));
}
else {
... | JavaScript |
/**
* Modified by quake, add new clipboard swf to support none IE browser and generic language highlight
* Code Syntax Highlighter.
* Version 1.5.1
* Copyright (C) 2004-2007 Alex Gorbatchev.
* http://www.dreamprojections.com/syntaxhighlighter/
*
* This library is free software; you can redistribute it an... | JavaScript |
Object.Event={
extend:function(object){
object._objectEventSetup=function(event_name){
this._observers=this._observers||{};
this._observers[event_name]=this._observers[event_name]||[];
};
object.observe=function(event_name,observer){
if(typeof(event_name)=='string'&&typeof(observer)!='undefined'){
this._objectEventSetu... | JavaScript |
/**
* FlashObject v1.3b: Flash detection and embed - http://blog.deconcept.com/flashobject/
*
* FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
*/
if(typeof com == "undefined") var com = new Object();
if(typeof com.deconcept == "u... | JavaScript |
<!-- START HIDE SCRIPT from disabled or old browsers
// **************************************************
// * FILE: search_counter.js
// * DATE: 02.26.2008
// *
// * AUTHOR: David Salinas
// *
// * Property of IBM. Copyright 2008
// *
// **************************************************
//var art... | JavaScript |
/*
* Returns an new XMLHttpRequest object, or false if the browser
* doesn't support it
*/
function newXMLHttpRequest() {
var xmlreq = false;
// Create XMLHttpRequest object in non-Microsoft browsers
if (window.XMLHttpRequest) {
xmlreq = new XMLHttpRequest();
} else if (window.ActiveXObject) {
... | JavaScript |
/* Prototype JavaScript framework, version 1.6.1
* (c) 2005-2009 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
* For details, see the Prototype web site: http://www.prototypejs.org/
*
*--------------------------------------------------------------------------*/
... | JavaScript |
function code_favorites_init(css_rules){
css_rules = css_rules || "pre[name=code]";
$$(css_rules).each(function(pre){
var sh_bar_tools = pre.previous().down(".tools");
var favorite_link = ' <a href="javascript:void()" title="收藏这段代码" onclick="code_favorites_do_favorite(this);return false;... | JavaScript |
function open_window(url) {
function o(){
if(!window.open(url,'iteye',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(screen.width-440)/2,',top=',(screen.height-430)/2].join('')))
window.location.href = url;
}
if(/Firefox/.test(navigator.userAgent)) {
setTimeout(o,0);
} else {
o... | JavaScript |
/*
*
* This code is data acquisition code for www.linezing.com web traffic analysis platform.
* www.linezing.com is Taobao's website.
*/
function lz_encode(str)
{
var e = "", i = 0;
for(i=0;i<str.length;i++) {
if(str.charCodeAt(i)>=0&&str.charCodeAt(i)<=255) {
e = e + escape(str.charAt(i));
}
else {
... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.