code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
;(function ($) {
/*
* jqGrid 3.6.4 - jQuery Grid
* Copyright (c) 2008, Tony Tomov, tony@trirand.com
* Dual licensed under the MIT and GPL licenses
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Date: 2010-02-14
*/
$.jgrid = $.jgrid || {};
$.extend($.jgrid,{
htmlDe... | JavaScript |
/**
* Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* .
* $Id: jquery.datePicker.js 102 2010-09-13 14:00:54Z kelvin.luck $
**/
(functi... | JavaScript |
/* 1.1.2
* One Click Upload - jQuery Plugin
* Copyright (c) 2008 Michael Mitchell - http://www.michaelmitchell.co.nz
*/
(function($){
$.fn.upload = function(options) {
/** Merge the users options with our defaults */
options = $.extend({
name: 'file',
enctype: 'multipart/form-data',
action: '',
auto... | JavaScript |
console.log("loading: messages.js");
if (window.Messages == undefined) {
var Messages = {};
};
Messages.Ping = {
TestEvent : {
update : "tests.Events.update"
}
};
Messages.Theme = {
getItem : function(templateName) {
return {
t : "theme.Manager.getItem",
d : {
i : templateName
}
};
},
getItem... | JavaScript |
function DeveloperTool(){}
DeveloperTool.prototype = {
Templates : {
Window : "<div class='dev-window'><div class='dev-window-header'></div><div class='dev-window-content'></div></div>"
},
Options : {
},
Init : function() {
console.log("DT:Init");
this.isShow = false;
this.headObj = $('html>h... | JavaScript |
if (window.console === undefined) {
if (Config.Debug != true) {
console = {
log:function(){},
error:function(){}
};
} else {
window.isStorageLogs = true;
window.isCreateNopConsole = true;
console = {
start_time : new Date(),
logs_storage : [],
log : function(msg) {
if (wind... | JavaScript |
/*
Error: JSON
ERR:[// errors list
{ // Error
code:"%s" // error code
clazz:"%s" // Exception class
msg:"%s" // Exception message
stack:"%s" // Exception stack
}
]
example: {
ERR:"[{code:Error1},{code:Error2}]"
}
Error: String
example: "#ERR:[{code:"Error1"}... | JavaScript |
console.log("loading: util.js");
function Util_Redirect(src){
window.location.href = src;
}
function Util_HoldControl(selectorO){
$(selectorO).addClass('control-hold');
}
function Util_UnHoldControl(selectorO){
$(selectorO).removeClass('control-hold');
}
function Util_GetFontZoom(){
var value = d... | JavaScript |
console.log("loading: window.js");
function WindowControl(params) {
// console.log("WindowControl::ctor()");
// windowTemplate
// isModal
if (params == undefined) {
params = {};
}
if (params.containerSelector != undefined) {
this.$container = $(params.containerSelector);
} else {
this.$container = $(docume... | JavaScript |
console.log("loading: template.manager.js");
var Templates = {};
var TemplateUsedWebStorage = false;
function TM_IsCached(templatename) {
return (Templates[templatename] != undefined)
&& (Templates[templatename].isLoading != true);
};
function TM_IsLoading(templatename) {
return (Templates[templatename] ... | JavaScript |
console.log("loading: url.utils.js");
var URLUtils = {
GetParameters : function(link) {
if (link == undefined) {
link = window.location.href;
}
var paramArr = URLUtils.GetParametersAsString(link).split(/&/);
var result = {};
for ( var i = 0; i < paramArr.length; i++) {
var param = paramArr[i].split(/=/... | JavaScript |
console.log("loading: callback.utils.js");
var CallbackUtils=
{
count:0,
callbacks:{},
// Return callback id
Add:function(callbackId,func,params)
{
if (func==undefined)
{
console.error('Add():func - is undefined');
}
if (callbackId==undefined)
{
callbackId= new Date().valueOf()+'!'+this... | JavaScript |
/**
*
* Secure Hash Algorithm (SHA1)
* http://www.webtoolkit.info/
*
**/
function SHA1 (msg) {
function rotate_left(n,s) {
var t4 = ( n<<s ) | (n>>>(32-s));
return t4;
};
function lsb_hex(val) {
var str="";
var i;
var vh;
var vl;
for( i=0; i<=6; i+=2 ) {
vh = (val>>>(i*4+4))&0x0f;
vl = (val... | JavaScript |
console.log("loading: background.shadow.js");
function BackgroundShadow(container)
{
//console.log("BackgroundShadow::ctor()");
if (container==undefined)
{
container =document.body;
}
this.$shadow=$('<div/>').hide().addClass('message-modal-window-mask').appendTo(container);
this.$container=$(container);
}
Bac... | JavaScript |
console.log("loading: msgbroker.js");
function MSGBroker_Send(path, data, onResultJson) {
return $.post(path, data, onResultJson, "json");
};
function MessageBroker() {
}
/*
* init: urlPing,urlAuth,urlPong
*/
MessageBroker.prototype = {
init : function(params) {
var mc = this;
mc._urlPing = pa... | JavaScript |
console.log("loading: init.js");
var msgBroker = new MessageBroker().init({
urlPing : Handlers.urlPing,
urlPong : Handlers.urlPong,
ssid : Config.SSID
}); | JavaScript |
/*
* jQuery selectBox - A cosmetic, styleable replacement for SELECT elements
*
* Licensed under the MIT license: http://opensource.org/licenses/MIT
*
* v1.2.0
*
* https://github.com/marcj/jquery-selectBox
*/
;(function ($) {
/**
* SelectBox class.
*
* @param {HTMLElement|jQuery} select If i... | JavaScript |
/*!
* jQuery Simulate v0.0.1 - simulate browser mouse and keyboard events
* https://github.com/jquery/jquery-simulate
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Sun Dec 9 12:15:33 2012 -0500
*/
;(function( $, undefined )... | JavaScript |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
jQuery(document).ready(
function() {
//
// When a user clicks the 'loading-default' link,
// call showLoading on the activity pane
// with default options
//
jQuery('a.loading-default').click... | JavaScript |
/*
* jQuery showLoading plugin v1.0
*
* Copyright (c) 2009 Jim Keller
* Context - http://www.contextllc.com
*
* Dual licensed under the MIT and GPL licenses.
*
*/
jQuery.fn.showLoading = function(options) {
var indicatorID;
var settings = {
'addClass': '',
'... | JavaScript |
/************************************************************************
*************************************************************************
@Name : jMenu - jQuery Plugin
@Revison : 1.9
@Date : 09/2012
@Author : ALPIXEL - (www.myjqueryplugins.com - www.alpixel.fr)
@Support : FF, I... | JavaScript |
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; +... | JavaScript |
/*
Version history
1.0.2 - row 86 - added "escape" to the querystring to keep all the parameters intact
*/
function SWFUpload(settings) {
// Remove background flicker in IE
try
{
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}
// Generate the tags ID
this.movie... | JavaScript |
function fileQueued(file, queuelength) {
var listingfiles = document.getElementById("SWFUploadFileListingFiles");
if(!listingfiles.getElementsByTagName("ul")[0]) {
var info = document.createElement("h4");
info.appendChild(document.createTextNode("File queue"));
listingfiles.appendChild(info);
... | JavaScript |
var mongodb = require('mongodb');
var MongoClient = require('mongodb').MongoClient;
var BSON = require('mongodb').pure().BSON;
var ObjectID = require("mongodb").ObjectID;
var mongourl = process.env.MONGOLAB_DB ? process.env.MONGOLAB_DB :'mongodb://admin:mta2013@ds039078.mongolab.com:39078/activiteam';//generate_mongo_... | JavaScript |
var mongodb = require('mongodb');
var BSON = require('mongodb').pure().BSON;
var ObjectID = require('mongodb').ObjectID;
/*
if(process.env.VCAP_SERVICES){
var env = JSON.parse(process.env.VCAP_SERVICES);
var mongo = env['mongodb-1.8'][0].credentials;
}
else{
var mongo = {
"hostname":"d... | JavaScript |
var mongodb = require('mongodb');
var BSON = require('mongodb').pure().BSON;
var ObjectID = require('mongodb').ObjectID;
/*
if(process.env.VCAP_SERVICES){
var env = JSON.parse(process.env.VCAP_SERVICES);
var mongo = env['mongodb-1.8'][0].credentials;
}
else{
var mongo = {
"hostname":"d... | JavaScript |
var mongodb = require('mongodb');
var BSON = require('mongodb').pure().BSON;
/*
if(process.env.VCAP_SERVICES){
var env = JSON.parse(process.env.VCAP_SERVICES);
var mongo = env['mongodb-1.8'][0].credentials;
}
else{
var mongo = {
"hostname":"ds039078.mongolab.com",
"port":39078,
... | JavaScript |
var mongodb = require('mongodb');
var BSON = require('mongodb').pure().BSON;
var ObjectID = require("mongodb").ObjectID;
/*
if (process.env.VCAP_SERVICES) {
var env = JSON.parse(process.env.VCAP_SERVICES);
var mongo = env['mongodb-1.8'][0]['credentials'];
} else {
var mongo = {
"hostname" : "ds039078.mongolab.c... | JavaScript |
var MongoClient = require('mongodb').MongoClient;
var ObjectID = require('mongodb').ObjectID;
var connectionString = process.env.MONGOLAB_DB ? process.env.MONGOLAB_DB : 'mongodb://admin:mta2013@ds039078.mongolab.com:39078/activiteam';
//returns: _id on success, error on failure
exports.createEvent = function(re... | JavaScript |
var mongodb = require('mongodb');
var fs = require('fs');
var BSON = require('mongodb').pure().BSON;
var ObjectID = require('mongodb').ObjectID;
var Grid = require('mongodb').Grid;
/*
if(process.env.VCAP_SERVICES){
var env = JSON.parse(process.env.VCAP_SERVICES);
var mongo = env['mongodb-1.8'][0].cred... | JavaScript |
var express = require("express");
var http = require('http');
var users = require("./routes/users"),
events = require("./routes/events"),
teams = require("./routes/teams"),
messages = require("./routes/messages"),
pictures = require("./routes/pictures"),
comments = require("./routes/comments"),
i... | JavaScript |
.label-size {
float: left;
margin: 0 0 7px 20px;
position: relative;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 0.75em;
font-weight: bold;
text-decoration: none;
color: #996633;
text-shadow: 0px 1px 0px rgba(255,255,255,.4);
padding: 0.417em 0.417em 0.417em 0.917em;
border-top: 1... | JavaScript |
jQuery(function() {
jQuery(panelSelector).hide()
.addClass('hompiPanel')
.before('<a class="openpanel" href="#">' + openPanelText + '<em></em></a>')
.after('<div class="paneline"></div>');
jQuery('a.openpanel').toggle(function() {
jQuery(this).addClass('active')... | JavaScript |
/**
* Advanced Blogger TOC Script by Taufik Nurrohman
* URL: https://plus.google.com/108949996304093815163/about
*/
var tocConfig = {
url: "",
feedNum: 6,
labelName: (window.location.hash && window.location.hash != "#0" && window.location.hash != "#search") ? encodeURIComponent(window.location.has... | JavaScript |
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function () {
var url_blog = 'http://ad1tweb.blogspot.com', // Replace With your Blog Url
numpostx = 20; // Maximum Post
$.ajax({
url: ''+url_blog+'/feeds/posts/default?alt=json-in-script&max-results=' + numpostx + '',
type: 'get',
dataType: ... | JavaScript |
<script type='text/javascript'>
//<![CDATA[
var emoRange = "#comments p, div.emoWrap",
putEmoAbove = "iframe#comment-editor",
emoMessage = "To insert emoticon you must added at least one space before the code.";
// Emoticon bar before comment-form
$(function() {
$(putEmoAbove)
.before('<div style="t... | JavaScript |
var comt = document.getElementsByClassName('comment-content');
for(var i=0;i<comt.length;i++){
comt[i].innerHTML = comt[i].innerHTML.replace(/ngentot/gi, "cantik");
comt[i].innerHTML = comt[i].innerHTML.replace(/ngewe/gi, "ganteng");
comt[i].... | JavaScript |
//Create namespace:
YAHOO.namespace("yui.examples");
//Only instantiate logger stuff if the page has loaded in logger mode:
if((YAHOO.widget.LogReader)&&(YAHOO.util.Dom.get("loggerDiv"))) {
//Create Logger instance for example page:
YAHOO.yui.examples.exampleLogger = new YAHOO.widget.LogReader("loggerDiv");
//Log... | JavaScript |
function overColor(Obj)
{
var elements=Obj.childNodes;
for(var i=0;i<elements.length;i++)
{
elements[i].className="bs1"
Obj.bgColor="";
}
}
function outColor(Obj)
{
var elements=Obj.childNodes;
for(var i=0;i<elements.length;i++)
{
elements[i].className="bs";
Obj.bgColor="";
}
... | JavaScript |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 Longhao Luo
*
* @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* @version 3.5.5 (2011-05... | JavaScript |
var JSON_URL = '../../asp/file_manager_json.asp';
var KE = parent.KindEditor;
var id = KE.util.getParam(location.href, 'id');
var fileManagerJson = (typeof KE.g[id].fileManagerJson == 'undefined') ? JSON_URL : KE.g[id].fileManagerJson;
var lang = KE.lang.plugins.file_manager;
KE.event.ready(function() {
var mo... | JavaScript |
var over=false,down=false,divleft,divtop,n;
function clase(x){
document.all[x].style.visibility='hidden'
}
function down1(m){
n=m;
down=true;
divleft=event.clientX-parseInt(m.style.left);
divtop=event.clientY-parseInt(m.style.top)
}
function move(){
if(down){
n.style.left=event.clientX-divleft;n.s... | JavaScript |
var lstart=0
var loop=true
var speed=85
var pr_step=3
var newspeed=800
var newspeed2=0
function makeObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(document.layers) ? eval(nest+'document.'+obj):eval(obj+'.style')
this.scrollHeight=(document.layers) ?
this.css.document.height:eval(obj+... | JavaScript |
if (navigator.appName == "Netscape")
document.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgheight=160:imgheight=150
window.screen.width>800 ? imgleft=20:imgleft=30
function threenineload_L()
{
if (navigator.appName == "Netscape")
{document.DGbanner10.pageY=pageYOffset+window.innerHeight-imgh... | JavaScript |
brOK=navigator.javaEnabled()?true:false;
//ns4=(document.layers)?true:false;
//ie4=(document.all)?true:false;
var vmin=2; var vmax=5; var vr=2; var timer1;
function Chip(chipname,width,height){
this.named=chipname;
this.vx=vmin+vmax*Math.random();
this.vy=vmin+vmax*Math.random();
this.w=width; this.h=height... | JavaScript |
if (navigator.appName == "Netscape")
document.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgheight=160:imgheight=150
window.screen.width>800 ? imgright=20:imgright=30
function threenineload()
{
if (navigator.appName == "Netscape")
{document.DGbanner3.pageY=pageYOffset+window.innerHeight-imghe... | JavaScript |
/*
*@Generator -> LiHuiGang - Email:lhg133@126.com - QQ:463214570 file:lhgajax.js
*@Copyright (c) 2009 LiHuiGang Compostion Blog:http://www.cnblogs.com/lhgstudio/
*/
var lhgajax = (function()
{
var gethttp = function()
{
try{ return new ActiveXObject('Msxml2.XMLHTTP'); }catch(e){}
try{ return... | JavaScript |
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
clearStr: "Clear",
todayStr: "Today",
okStr: "OK",
updateStr: "OK",
tim... | JavaScript |
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'gb2312'},
{name:'zh-tw', charset:'GBK'}
];
var skinList =
[
{name:'default', charset:'gb2312'},
{name:'whyGreen', charset:'gb2312'}
]; | JavaScript |
// JavaScript Document
var EditorType="editAreaLoader";
$(document).ready(function() {
var editor=['DiyContent','outerfor','ForClassContent','LabelContent','content'];
function DoEditor(){
if(typeof(editAreaLoader)!="undefined"){
$(editor).each(function(index, element) {
... | JavaScript |
/*--------------------------------------------------|
| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
|---------------------------------------------------|
| Copyright (c) 2002-2003 Geir Landr? |
| |
| This script can be used freely as long as al... | JavaScript |
/*--------------------------------------------------|
| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
|---------------------------------------------------|
| Copyright (c) 2002-2003 Geir Landr? |
| |
| This script can be used freely as long as ... | JavaScript |
function LoadFlash(url,wmode,width,Height,param)
{
document.write(
'<embed src="' + url + '" FlashVars="'+param+'" wmode=' + wmode +
' quality="high" pluginspage=http://www.macromedia.com/go/getflashplayer type="application/x-shockwave-flash" width="' + width +
'" height="' + Height + '"></embed>');
} | JavaScript |
function OpenMWin(url,w,h)
{
var theDes = "status:no;center:yes;help:no;minimize:no;maximize:no;dialogWidth:"+w+"px;scroll:no;dialogHeight:"+h+"px;border:think";
return self.showModalDialog(url,null,theDes);
}
function Selector(type, val, ModeID, all)
{
val = val?val:'';
ModeID = ModeID?ModeID:'... | JavaScript |
// send html to the post editor
var wpActiveEditor;
function send_to_editor(h) {
var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined';
if ( !wpActiveEditor ) {
if ( mce && tinymce.activeEditor ) {
ed = tinymce.activeEditor;
wpActiveEditor = ed.id;
} else if ( !qt ) {
return ... | JavaScript |
(function($) {
wpWordCount = {
settings : {
strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
count : /\S\s+/g // counting regexp
},
block : 0,
wc : function(tx) {
var t = this, w = $('.word-count'), tc = 0;
if ( ... | JavaScript |
(function($) {
inlineEditPost = {
init : function(){
var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
t.type = $('table.widefat').hasClass('pages') ? 'page' : 'post';
t.what = '#post-';
// prepare the edit rows
qeRow.keyup(function(e){
if (e.which == 27)
return inlineEditPost.rev... | JavaScript |
(function($) {
inlineEditTax = {
init : function() {
var t = this, row = $('#inline-edit');
t.type = $('#the-list').attr('class').substr(5);
t.what = '#'+t.type+'-';
$('.editinline').live('click', function(){
inlineEditTax.edit(this);
return false;
});
// prepare the edit row
row.keyup(functio... | JavaScript |
jQuery(document).ready( function($) {
var newCat, noSyncChecks = false, syncChecks, catAddAfter;
$('#link_name').focus();
// postboxes
postboxes.add_postbox_toggles('link');
// category tabs
$('#category-tabs a').click(function(){
var t = $(this).attr('href');
$(this).parent().addClass('tabs').siblings('li... | JavaScript |
jQuery(document).ready( function($) {
var stamp = $('#timestamp').html();
$('.edit-timestamp').click(function () {
if ($('#timestampdiv').is(":hidden")) {
$('#timestampdiv').slideDown("normal");
$('.edit-timestamp').hide();
}
return false;
});
$('.cancel-timestamp').click(function() {
$('#timestampd... | JavaScript |
jQuery(document).ready( function($) {
$('#link_rel').prop('readonly', true);
$('#linkxfndiv input').bind('click keyup', function() {
var isMe = $('#me').is(':checked'), inputs = '';
$('input.valinp').each( function() {
if (isMe) {
$(this).prop('disabled', true).parent().addClass('disabled');
} else {
... | JavaScript |
var farbtastic;
function pickColor(color) {
farbtastic.setColor(color);
jQuery('#background-color').val(color);
jQuery('#custom-background-image').css('background-color', color);
if ( color && color !== '#' )
jQuery('#clearcolor').show();
else
jQuery('#clearcolor').hide();
}
jQuery(document).ready(function()... | JavaScript |
var showNotice, adminMenu, columns, validateForm, screenMeta, autofold_menu;
(function($){
// Removed in 3.3.
// (perhaps) needed for back-compat
adminMenu = {
init : function() {},
fold : function() {},
restoreMenuState : function() {},
toggle : function() {},
favorites : function() {}
};
// show/hide/save table... | JavaScript |
var ThemeViewer;
(function($){
ThemeViewer = function( args ) {
function init() {
$( '#filter-click, #mini-filter-click' ).unbind( 'click' ).click( function() {
$( '#filter-click' ).toggleClass( 'current' );
$( '#filter-box' ).slideToggle();
$( '#current-theme' ).slideToggle( 300 );
return false... | JavaScript |
jQuery(document).ready(function($) {
$('.delete-tag').live('click', function(e){
var t = $(this), tr = t.parents('tr'), r = true, data;
if ( 'undefined' != showNotice )
r = showNotice.warn();
if ( r ) {
data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag');
$.post(a... | JavaScript |
var switchEditors = {
switchto: function(el) {
var aid = el.id, l = aid.length, id = aid.substr(0, l - 5), mode = aid.substr(l - 4);
this.go(id, mode);
},
go: function(id, mode) { // mode can be 'html', 'tmce', or 'toggle'
id = id || 'content';
mode = mode || 'toggle';
var t = this, ed = tinyMCE.get(i... | JavaScript |
jQuery(document).ready(function($) {
var gallerySortable, gallerySortableInit, w, desc = false;
gallerySortableInit = function() {
gallerySortable = $('#media-items').sortable( {
items: 'div.media-item',
placeholder: 'sorthelper',
axis: 'y',
distance: 2,
handle: 'div.filename',
stop: function(e, ... | JavaScript |
jQuery(document).ready(function($) {
var options = false, addAfter, delBefore, delAfter;
if ( document.forms['addcat'].category_parent )
options = document.forms['addcat'].category_parent.options;
addAfter = function( r, settings ) {
var name, id;
name = $("<span>" + $('name', r).text() + "</span>").text();
... | JavaScript |
/*!
* Farbtastic: jQuery color picker plug-in v1.3u
*
* Licensed under the GPL license:
* http://www.gnu.org/licenses/gpl.html
*/
(function($) {
$.fn.farbtastic = function (options) {
$.farbtastic(this, options);
return this;
};
$.farbtastic = function (container, callback) {
var container = $(container)... | JavaScript |
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint;
// return an array with any duplicate, whitespace or values removed
function array_unique_noempty(a) {
var out = [];
jQuery.each( a, function(key, val) {
val = jQuery.trim(val);
if... | JavaScript |
// utility functions
var wpCookies = {
// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
each : function(o, cb, s) {
var n, l;
if (!o)
return 0;
s = s || o;
if (typeof(o.length) != 'undefined') {
for (n=0, l = o.length; n<l; n++) {
if (cb.call(s, o[n], n... | JavaScript |
(function($){
function check_pass_strength() {
var pass1 = $('#pass1').val(), user = $('#user_login').val(), pass2 = $('#pass2').val(), strength;
$('#pass-strength-result').removeClass('short bad good strong');
if ( ! pass1 ) {
$('#pass-strength-result').html( pwsL10n.empty );
return;
}
strength = p... | JavaScript |
var wpWidgets;
(function($) {
wpWidgets = {
init : function() {
var rem, sidebars = $('div.widgets-sortables'), isRTL = !! ( 'undefined' != typeof isRtl && isRtl ),
margin = ( isRtl ? 'marginRight' : 'marginLeft' ), the_id;
$('#widgets-right').children('.widgets-holder-wrap').children('.sidebar-name').click(... | JavaScript |
/* Plugin Browser Thickbox related JS*/
var tb_position;
jQuery(document).ready(function($) {
tb_position = function() {
var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0;
if ( $('body.admin-bar').length )
adminbar_height =... | JavaScript |
// Password strength meter
function passwordStrength(password1, username, password2) {
var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, mismatch = 5, symbolSize = 0, natLog, score;
// password 1 != password 2
if ( (password1 != password2) && password2.length > 0)
return mismatch
//password < 4
if ... | JavaScript |
var imageEdit;
(function($) {
imageEdit = {
iasapi : {},
hold : {},
postid : '',
intval : function(f) {
return f | 0;
},
setDisabled : function(el, s) {
if ( s ) {
el.removeClass('disabled');
$('input', el).removeAttr('disabled');
} else {
el.addClass('disabled');
$('input', el).prop('disable... | JavaScript |
var findPosts;
(function($){
findPosts = {
open : function(af_name, af_val) {
var st = document.documentElement.scrollTop || $(document).scrollTop();
if ( af_name && af_val ) {
$('#affected').attr('name', af_name).val(af_val);
}
$('#find-posts').show().draggable({
handle: '#find-posts-head'
... | JavaScript |
/**
* WordPress Administration Navigation Menu
* Interface JS functions
*
* @version 2.0.0
*
* @package WordPress
* @subpackage Administration
*/
var wpNavMenu;
(function($) {
var api = wpNavMenu = {
options : {
menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxToDepth instead.
... | JavaScript |
/**
* PubSub
*
* A lightweight publish/subscribe implementation.
* Private use only!
*/
var PubSub, fullscreen, wptitlehint;
PubSub = function() {
this.topics = {};
};
PubSub.prototype.subscribe = function( topic, callback ) {
if ( ! this.topics[ topic ] )
this.topics[ topic ] = [];
this.topics[ topic ].pu... | JavaScript |
var theList, theExtraList, toggleWithKeyboard = false, getCount, updateCount, updatePending, dashboardTotals;
(function($) {
setCommentsList = function() {
var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList;
totalInput = $('input[name=... | JavaScript |
var thickDims, tbWidth, tbHeight;
jQuery(document).ready(function($) {
thickDims = function() {
var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h;
w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90;
h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60;
if ( tbWindow.s... | JavaScript |
var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad;
jQuery(document).ready( function($) {
/* Dashboard Welcome Panel */
var welcomePanel = $('#welcome-panel'),
welcomePanelHide = $('#wp_welcome_panel-hide'),
updateWelcomePanel = function( visible ) {
$.post( ajaxurl, {
action: 'update-welcome-panel',
... | JavaScript |
jQuery(document).ready( function($) {
var before, addBefore, addAfter, delBefore;
before = function() {
var nonce = $('#newmeta [name="_ajax_nonce"]').val(), postId = $('#post_ID').val();
if ( !nonce || !postId ) { return false; }
return [nonce,postId];
}
addBefore = function( s ) {
var b = before();
if... | JavaScript |
var postboxes, is_iPad = navigator.userAgent.match(/iPad/);
(function($) {
postboxes = {
add_postbox_toggles : function(page, args) {
this.init(page, args);
$('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() {
var p = $(this).parent('.postbox'), id = p.attr('id');
if ( 'dashboa... | JavaScript |
function WPSetAsThumbnail(id, nonce){
var $link = jQuery('a#wp-post-thumbnail-' + id);
$link.text( setPostThumbnailL10n.saving );
jQuery.post(ajaxurl, {
action:"set-post-thumbnail", post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie)
}, function(str){
var win = w... | JavaScript |
var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
function fileDialogStart() {
jQuery("#media-upload-error").empty();
}
// progress and success handlers for media multi uploads
function fileQueued(fileObj) {
// Get rid of unused form
jQuery('.media-blank').remove();
var ite... | JavaScript |
/*
http://www.JSON.org/json2.js
2011-02-23
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE... | JavaScript |
/**
* Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright not... | JavaScript |
// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final... | JavaScript |
/*
* Quicktags
*
* This is the HTML editor in WordPress. It can be attached to any textarea and will
* append a toolbar above it. This script is self-contained (does not require external libraries).
*
* Run quicktags(settings) to initialize it, where settings is an object containing up to 3 properties:
* settin... | JavaScript |
// script.aculo.us unittest.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com)
// (c) 2005-2009 Michael Schuerig (http://www.schuerig.de/michael/)
//
// script.aculo.us i... | JavaScript |
// script.aculo.us slider.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Marty Haught, Thomas Fuchs
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
if (!Control) var Control = { };
/... | JavaScript |
// script.aculo.us sound.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Based on code created by Jules Gravinese (http://www.webveteran.com/)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// ... | JavaScript |
// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"),... | JavaScript |
// script.aculo.us builder.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
va... | JavaScript |
// script.aculo.us scriptaculous.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009
// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"),... | JavaScript |
addComment = {
moveForm : function(commId, parentId, respondId, postId) {
var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID');
if ( ! comm || ! respond || ! cancel || ! parent )
return;
t.r... | JavaScript |
var wpAjax = jQuery.extend( {
unserialize: function( s ) {
var r = {}, q, pp, i, p;
if ( !s ) { return r; }
q = s.split('?'); if ( q[1] ) { s = q[1]; }
pp = s.split('&');
for ( i in pp ) {
if ( jQuery.isFunction(pp.hasOwnProperty) && !pp.hasOwnProperty(i) ) { continue; }
p = pp[i].split('=');
r[p[0]... | JavaScript |
var topWin = window.dialogArguments || opener || parent || top;
function fileDialogStart() {
jQuery("#media-upload-error").empty();
}
// progress and success handlers for media multi uploads
function fileQueued(fileObj) {
// Get rid of unused form
jQuery('.media-blank').remove();
// Collapse a single item
if ( j... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.