code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
function selectall(formid,b){
var oForm=E(formid);
for (var i = 0; i < oForm.elements.length; i++) {
if(oForm.elements[i].type=="checkbox"&&!oForm.elements[i].disabled){
oForm.elements[i].checked = b;
}
}
}
function changeAction(){
var d = E("postaction").value;
setDisplay("movetofid",d=="movePo... | JavaScript |
function ColorPicker(){
var _t=this;
var cobj;
//常用的颜色
var _comcolor = new Array('#000000', '#333333', '#666666', '#999999','#CCCCCC', '#FFFFFF', '#FF000', '#00FF00','#0000FF', '#FFFF00', '#00FFFF', '#FF00FF','#C0C0C0', '#DEDEDE', '#FFFFFF', '#FFFFFF');
var _hex = new Array('0', '1', '2', '3', '4', '5', '6'... | JavaScript |
//member_details
var hasDetailsErr = false;
function checkEmail(){
var v = E("email").value;
if(!isEmail(v)){
hasDetailsErr = true ;
E("email_tips").innerHTML = "<span class='errStyle'>请输入正确的Email地址</span>";
}else{
E("email_tips").innerHTML = "<span class='yesStyle'>该Email填写正确</span>";
}
}
... | JavaScript |
///////////ajaxGet
///////////ajaxPost
function ajaxGet(url, callback) {
var req = newXMLHttpRequest();
url = url + ((url.indexOf("?")==-1)?"?":"&") +"timestamp="+(new Date()).getTime();
if (req) {
req.open("GET", url, true);
req.onreadystatechange = getReadyStateHandler(req, callback);
req.send(null... | JavaScript |
////////////////////////////
////Tabs
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function Tabs()
{
this.nowTab = "";
this.needSelect = true;
this.tabidsAry = new Array();
this.tabvalsAry = new Array();
this.classpre = "tab_... | JavaScript |
function PaginationClass(){
this.pageNum=0;
this.cPage=1;
this.MIN = 1;
this.MAX;
this.FIRST;
this.P = 4;
this.E = 8;
this.styleClass="Pagination";
this.turnLength = function(i){
var s = i;
if(this.styleClass=="Pagination"){
if(i<10){
s=" "+i+" ";
}else if(i<10... | JavaScript |
document.writeln("<div id='DateGird' style='display:none;position:absolute;left:0px; top:0px; z-index:600001;border:1px solid #e0e0e0;background-color: #F08B09;'></div>");
var Glob_YY=parseInt(new Date().getFullYear());
var Glob_MM=parseInt(new Date().getMonth()+1);
var Glob_DD=parseInt(new Date().getDate());
va... | JavaScript |
var re;
if(isUndefined(codecount)) var codecount = '-1';
if(isUndefined(codehtml)) var codehtml = new Array();
function addslashes(str) {
return preg_replace(['\\\\', '\\\'', '\\\/', '\\\(', '\\\)', '\\\[', '\\\]', '\\\{', '\\\}', '\\\^', '\\\$', '\\\?', '\\\.', '\\\*', '\\\+', '\\\|'], ['\\\\', '\\\'', '\\/', '... | JavaScript |
var fmt = new Array(); //6K:文本标签
//6K:浏览器判断
var userAgent = navigator.userAgent.toLowerCase();
var isOpera = userAgent.indexOf('opera') != -1 && opera.version();
var isMoz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
var isIE = (userAgent.indexOf('msie') != -1 && !is... | JavaScript |
//获取URL参数的方法
function getQueryStringRegExp(name) { var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i"); if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return ""; };
//获取表单域
var ubbHideFieldId = getQueryStringRegExp("id");
var ifrEditorId = getQueryStringRegExp("frmid")... | JavaScript |
/* Demo Note: This demo uses a FileProgress class that handles the UI for displaying the file name and percent complete.
The FileProgress class is not part of SWFUpload.
*/
/* **********************
Event Handlers
These are my custom event handlers to make my
web application behave the way I went wh... | JavaScript |
/**
* SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
*
* mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/
*
* SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz閚 and Mammon Media and is released under the MIT License:
* http://www.open... | JavaScript |
/*
Queue Plug-in
Features:
*Adds a cancelQueue() method for cancelling the entire queue.
*All queued files are uploaded when startUpload() is called.
*If false is returned from uploadComplete then the queue upload is stopped.
If false is not returned (strict comparison) then the queue upload is cont... | JavaScript |
/*
A simple class for displaying file information and progress
Note: This is a demonstration only and not part of SWFUpload.
Note: Some have had problems adapting this class in IE7. It may not be suitable for your application.
*/
// Constructor
// file is a SWFUpload file object
// targetID is the HTML elem... | JavaScript |
jQuery(document).ready(function () {
jQuery('.akismet-status').each(function () {
var thisId = jQuery(this).attr('commentid');
jQuery(this).prependTo('#comment-' + thisId + ' .column-comment div:first-child');
});
jQuery('.akismet-user-comment-count').each(function () {
var thisId = jQuery(this).attr('commenti... | JavaScript |
/* search and nav */
jQuery(document).ready(function(){
var delayTime = [];
jQuery('#nav li:has(ul)').each(function(index) {
$(this).hover(function() {
var _self = this;
delayTime[index] = setTimeout(function() {
$(_self).find('ul:eq(0)').slideDown(200)
... | JavaScript |
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights res... | JavaScript |
/**
* WordPress jQuery-Ajax-Comments v1.3 by Willin Kan.
* URI: http://kan.willin.org/?p=1271
*/
var i = 0, got = -1, len = document.getElementsByTagName('script').length;
while ( i <= len && got == -1){
var js_url = document.getElementsByTagName('script')[i].src,
got = js_url.indexOf('comments-ajax.js');... | JavaScript |
/*
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilties for all documentation.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* make the code below compatib... | JavaScript |
/*
* sidebar.js
* ~~~~~~~~~~
*
* This script makes the Sphinx sidebar collapsible.
*
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
* used to collapse and expand the sidebar.
*
* When the sidebar is collapsed the .sphinxsi... | JavaScript |
/*
* searchtools.js
* ~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
/**
* helper function to return a node containing the
* search summary for a given text. keywords ... | JavaScript |
/*
* http://ejohn.org/blog/javascript-pretty-date#postcomment
*/
function prettyDate(time){
var date = new Date((time || "").replace(/-/g,"/").replace(/[TZ]/g," ")),
localDate = new Date(),
diff = ((localDate.getTime() + (localDate.getTimezoneOffset() * 60000) - date.getTime()) / 1000),
day_diff = M... | JavaScript |
var Ajax;
if (Ajax && (Ajax != null)) {
Ajax.Responders.register({
onCreate: function() {
if($('spinner') && Ajax.activeRequestCount>0)
Effect.Appear('spinner',{duration:0.5,queue:'end'});
},
onComplete: function() {
if($('spinner') && Ajax.activeRequestCount==0)
Effect.Fad... | JavaScript |
var theImages = new Array();
theImages[0] = '/images/titles/title3.gif'
theImages[1] = '/images/titles/title4.gif'
theImages[2] = '/images/titles/title5.gif'
theImages[3] = '/images/titles/title7.gif'
theImages[4] = '/images/titles/title8.gif'
theImages[5] = '/images/titles/title9.gif'
theImages[6] = '/images/titles/... | JavaScript |
function showSpinner(divId) {
$(divId).show();
}
function hideSpinner(divId) {
$(divId).hide();
}
| JavaScript |
// -----------------------------------------------------------------------------------
//
// Lightbox v2.03
// by Lokesh Dhakar - http://www.huddletogether.com
// 4/9/06
//
// For more information on this script, visit:
// http://huddletogether.com/projects/lightbox2/
//
// Licensed under the Creative Commons Attributi... | JavaScript |
/*
* http://ejohn.org/blog/javascript-pretty-date#postcomment
*/
function prettyDate(time){
var date = new Date((time || "").replace(/-/g,"/").replace(/[TZ]/g," ")),
localDate = new Date(),
diff = ((localDate.getTime() + (localDate.getTimezoneOffset() * 60000) - date.getTime()) / 1000),
day_diff = M... | JavaScript |
var Ajax;
if (Ajax && (Ajax != null)) {
Ajax.Responders.register({
onCreate: function() {
if($('spinner') && Ajax.activeRequestCount>0)
Effect.Appear('spinner',{duration:0.5,queue:'end'});
},
onComplete: function() {
if($('spinner') && Ajax.activeRequestCount==0)
Effect.Fad... | JavaScript |
var theImages = new Array();
theImages[0] = '/images/titles/title3.gif'
theImages[1] = '/images/titles/title4.gif'
theImages[2] = '/images/titles/title5.gif'
theImages[3] = '/images/titles/title7.gif'
theImages[4] = '/images/titles/title8.gif'
theImages[5] = '/images/titles/title9.gif'
theImages[6] = '/images/titles/... | JavaScript |
function showSpinner(divId) {
$(divId).show();
}
function hideSpinner(divId) {
$(divId).hide();
}
| JavaScript |
// -----------------------------------------------------------------------------------
//
// Lightbox v2.03
// by Lokesh Dhakar - http://www.huddletogether.com
// 4/9/06
//
// For more information on this script, visit:
// http://huddletogether.com/projects/lightbox2/
//
// Licensed under the Creative Commons Attributi... | JavaScript |
/*
* http://ejohn.org/blog/javascript-pretty-date#postcomment
*/
function prettyDate(time){
var date = new Date((time || "").replace(/-/g,"/").replace(/[TZ]/g," ")),
localDate = new Date(),
diff = ((localDate.getTime() + (localDate.getTimezoneOffset() * 60000) - date.getTime()) / 1000),
day_diff = M... | JavaScript |
var Ajax;
if (Ajax && (Ajax != null)) {
Ajax.Responders.register({
onCreate: function() {
if($('spinner') && Ajax.activeRequestCount>0)
Effect.Appear('spinner',{duration:0.5,queue:'end'});
},
onComplete: function() {
if($('spinner') && Ajax.activeRequestCount==0)
Effect.Fad... | JavaScript |
var theImages = new Array();
theImages[0] = '/images/titles/title3.gif'
theImages[1] = '/images/titles/title4.gif'
theImages[2] = '/images/titles/title5.gif'
theImages[3] = '/images/titles/title7.gif'
theImages[4] = '/images/titles/title8.gif'
theImages[5] = '/images/titles/title9.gif'
theImages[6] = '/images/titles/... | JavaScript |
var tooltip=function(){
var id = 'tt';
var top = 3;
var left = 3;
var maxw = 300;
var speed = 1000;
var timer = 0;
var endalpha = 95;
var alpha = 0;
var tt,h;
var ie = document.all ? true : false;
return{
show:function(v,w){
if(tt == null){
tt = document.createElement('div');
tt.setAttribute('id... | JavaScript |
function showSpinner(divId) {
$(divId).show();
}
function hideSpinner(divId) {
$(divId).hide();
}
| JavaScript |
// -----------------------------------------------------------------------------------
//
// Lightbox v2.03
// by Lokesh Dhakar - http://www.huddletogether.com
// 4/9/06
//
// For more information on this script, visit:
// http://huddletogether.com/projects/lightbox2/
//
// Licensed under the Creative Commons Attributi... | JavaScript |
var Wami = window.Wami || {};
// Upon a creation of a new Wami.GUI(options), we assume that a WAMI recorder
// has been initialized.
Wami.GUI = function(options) {
var RECORD_BUTTON = 1;
var PLAY_BUTTON = 2;
setOptions(options);
setupDOM();
var recordButton, playButton;
var recordInterval, playInterval;
func... | JavaScript |
var Wami = window.Wami || {};
// Returns a (very likely) unique string with of random letters and numbers
Wami.createID = function() {
return "wid" + ("" + 1e10).replace(/[018]/g, function(a) {
return (a ^ Math.random() * 16 >> a / 4).toString(16)
});
}
// Creates a named callback in WAMI and returns the name as ... | JavaScript |
TestCase('PersonTest', {
testWhoAreYou : function() {
var p = new Person('John', 'Doe', 'P.');
assertEquals('Should have responded with full name', 'John P. Doe', p.whoAreYou());
},
testWhoAreYouWithNoMiddleName : function() {
var p = new Person('John', 'Doe');
assertEqual... | JavaScript |
var Person = function(first, last, middle) {
this.first = first;
this.middle = middle;
this.last = last;
};
Person.prototype = {
whoAreYou : function() {
return this.first + (this.middle ? ' ' + this.middle: '') + ' ' + this.last;
}
}; | JavaScript |
$(document).ready(function(){
// 在这里写你的代码...
headerDisplay();
});
function headerDisplay()
{
$(".headerlablesflame").css({'position':'absolute','overflow':'hidden','background':'red'});
$(".headersublables").hide();
var h=$(".headersublables").height();
$(".headerlables").hover(
function () {
... | JavaScript |
/* global ajaxurl, wpAjax */
var findPosts;
(function($){
findPosts = {
open : function(af_name, af_val) {
var st = document.documentElement.scrollTop || $(document).scrollTop(),
overlay = $( '.ui-find-overlay' );
if ( overlay.length === 0 ) {
$( 'body' ).append( '<div class="ui-find-overlay"></div>'... | JavaScript |
/* global wpColorPickerL10n:true */
( function( $, undef ){
var ColorPicker,
// html stuff
_before = '<a tabindex="0" class="wp-color-result" />',
_after = '<div class="wp-picker-holder" />',
_wrap = '<div class="wp-picker-container" />',
_button = '<input type="button" class="button button-small hidden" />... | JavaScript |
/* global setUserSetting, ajaxurl, commonL10n, alert, confirm, toggleWithKeyboard, pagenow */
var showNotice, adminMenu, columns, validateForm, screenMeta;
( function( $, window, undefined ) {
// Removed in 3.3.
// (perhaps) needed for back-compat
adminMenu = {
init : function() {},
fold : function() {},
restoreMenu... | JavaScript |
/* global pagenow, ajaxurl, postboxes, wpActiveEditor:true */
var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad;
jQuery(document).ready( function($) {
var welcomePanel = $( '#welcome-panel' ),
welcomePanelHide = $('#wp_welcome_panel-hide'),
updateWelcomePanel;
updateWelcomePanel = function( visible ) {
$.p... | JavaScript |
( function( $ ){
$( document ).ready( function () {
// Expand/Collapse on click
$( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) {
if ( e.type === 'keydown' && 13 !== e.which ) // "return" key
return;
e.preventDefault(); // Keep this AFTER the key filter above... | JavaScript |
/**
* WordPress Administration Navigation Menu
* Interface JS functions
*
* @version 2.0.0
*
* @package WordPress
* @subpackage Administration
*/
/* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */
var wpNavMenu;
(function($) {
var api;
api = wpNavMenu = {
options : {
menuItemDepthP... | JavaScript |
/* global isRtl */
(function($) {
var frame;
$( function() {
// Fetch available headers and apply jQuery.masonry
// once the images have loaded.
var $headers = $('.available-headers');
$headers.imagesLoaded( function() {
$headers.masonry({
itemSelector: '.default-header',
isRTL: !! ( 'undefined' ... | JavaScript |
/* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, getUserSetting, setUserSetting */
/* global theList:true, theExtraList:true, autosave:true */
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveTh... | JavaScript |
/* global ajaxurl, deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit, wp_fullscreen_settings, wpActiveEditor:true, wpLink */
/**
* PubSub
*
* A lightweight publish/subscribe implementation.
* Private use only!
*/
var PubSub, fullscreen, wptitlehint;
PubSub = function() {
this.topics = {};... | JavaScript |
/* global tb_click */
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 - 6... | 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 |
/* global postboxes:true, commentL10n:true */
jQuery(document).ready( function($) {
postboxes.add_postbox_toggles('comment');
var stamp = $('#timestamp').html();
$('.edit-timestamp').click(function () {
if ($('#timestampdiv').is(':hidden')) {
$('#timestampdiv').slideDown('normal');
$('.edit-timestamp').hid... | JavaScript |
/* global setPostThumbnailL10n, ajaxurl, post_id, alert */
/* exported WPSetAsThumbnail */
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, ... | JavaScript |
/* global zxcvbn */
window.wp = window.wp || {};
var passwordStrength;
(function($){
wp.passwordStrength = {
/**
* Determine the strength of a given password
*
* @param string password1 The password
* @param array blacklist An array of words that will lower the entropy of the password
* @param string... | JavaScript |
/* global _wpRevisionsSettings, isRtl */
window.wp = window.wp || {};
(function($) {
var revisions;
revisions = wp.revisions = { model: {}, view: {}, controller: {} };
// Link settings.
revisions.settings = _.isUndefined( _wpRevisionsSettings ) ? {} : _wpRevisionsSettings;
// For debugging
revisions.debug = f... | JavaScript |
/* global imageEditL10n, ajaxurl, confirm */
(function($) {
var imageEdit = window.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.... | JavaScript |
/* global ajaxurl, current_site_id, isRtl */
(function( $ ) {
var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : '';
$(document).ready( function() {
var position = { offset: '0, -1' };
if ( typeof isRtl !== 'undefined' && isRtl ) {
position.my = 'right top';
position.at =... | JavaScript |
/*global ajaxurl, isRtl */
var wpWidgets;
(function($) {
wpWidgets = {
init : function() {
var rem, the_id,
self = this,
chooser = $('.widgets-chooser'),
selectSidebar = chooser.find('.widgets-chooser-sidebars'),
sidebars = $('div.widgets-sortables'),
isRTL = !! ( 'undefined' !== typeof isRtl && isR... | JavaScript |
(function( exports, $ ){
var api = wp.customize;
/**
* @param options
* - previewer - The Previewer instance to sync with.
* - transport - The transport to use for previewing. Supports 'refresh' and 'postMessage'.
*/
api.Setting = api.Value.extend({
initialize: function( id, value, options ) {
api.Valu... | JavaScript |
/* global tinymce, QTags, tb_remove */
// send html to the post editor
var wpActiveEditor, send_to_editor;
send_to_editor = function(h) {
var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined';
if ( !wpActiveEditor ) {
if ( mce && tinymce.activeEditor ) {
ed = tinymce.activeEditor;
... | JavaScript |
/* global wordCountL10n */
var wpWordCount;
(function($,undefined) {
wpWordCount = {
settings : {
strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags
clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc.
w : /\S\s+/g, // word-counting regexp
c : /\S/g // char-counting regexp for as... | 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( 'dis... | JavaScript |
/* global ajaxurl */
(function($) {
$(document).ready(function() {
var frame,
bgImage = $( '#custom-background-image' );
$('#background-color').wpColorPicker({
change: function( event, ui ) {
bgImage.css('background-color', ui.color.toString());
},
clear: function() {
bgImage.css('background-c... | JavaScript |
/* global inlineEditL10n, ajaxurl */
var inlineEditTax;
(function($) {
inlineEditTax = {
init : function() {
var t = this, row = $('#inline-edit');
t.type = $('#the-list').attr('data-wp-lists').substr(5);
t.what = '#'+t.type+'-';
$('#the-list').on('click', 'a.editinline', function(){
inlineEditTax.edit(... | JavaScript |
/* global ajaxurl, wpAjax, tagsl10n, showNotice, validateForm */
jQuery(document).ready(function($) {
$( '#the-list' ).on( 'click', '.delete-tag', function() {
var t = $(this), tr = t.parents('tr'), r = true, data;
if ( 'undefined' != showNotice )
r = showNotice.warn();
if ( r ) {
data = t.attr('href').r... | JavaScript |
/* global tinymce, tinyMCEPreInit, QTags, setUserSetting */
window.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 );
},
// mode can be 'html', 'tmce', or 'toggle'; 'html' is used for the 'Text' ... | JavaScript |
/* global unescape, getUserSetting, setUserSetting */
jQuery(document).ready(function($) {
var gallerySortable, gallerySortableInit, sortIt, clearAll, w, desc = false;
gallerySortableInit = function() {
gallerySortable = $('#media-items').sortable( {
items: 'div.media-item',
placeholder: 'sorthelper',
ax... | JavaScript |
/* global ajaxurl */
jQuery(function($){
$( 'body' ).bind( 'click.wp-gallery', function(e){
var target = $( e.target ), id, img_size;
if ( target.hasClass( 'wp-set-header' ) ) {
( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' );
e.preventDefault();
} else if (... | JavaScript |
/* global plugininstallL10n, tb_click, confirm */
/* 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... | JavaScript |
/* global ajaxurl */
var postboxes;
(function($) {
postboxes = {
add_postbox_toggles : function(page, args) {
var self = this;
self.init(page, args);
$('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() {
var p = $(this).parent('.postbox'), id = p.attr('id');
if ( 'dashboard... | JavaScript |
/* global inlineEditL10n, ajaxurl, typenow */
var inlineEditPost;
(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.key... | JavaScript |
/* global ajaxurl, list_args, theme_list_args */
var theme_viewer;
/**
* Theme Browsing
*
* Controls visibility of theme details on manage and install themes pages.
*/
jQuery( function($) {
$('#availablethemes').on( 'click', '.theme-detail', function (event) {
var theme = $(this).closest('.available-theme'),... | JavaScript |
/* global _wpThemeSettings, confirm */
window.wp = window.wp || {};
( function($) {
// Set up our namespace...
var themes, l10n;
themes = wp.themes = wp.themes || {};
// Store the theme data and settings for organized and quick access
// themes.data.settings, themes.data.themes, themes.data.l10n
themes.data = _wpThe... | JavaScript |
/**
* Attempt to re-color SVG icons used in the admin menu or the toolbar
*
*/
window.wp = window.wp || {};
wp.svgPainter = ( function( $, window, document, undefined ) {
'use strict';
var selector, base64, painter,
colorscheme = {},
elements = [];
$(document).ready( function() {
// detection for browser... | JavaScript |
/* global ajaxurl, pwsL10n */
(function($){
function check_pass_strength() {
var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength;
$('#pass-strength-result').removeClass('short bad good strong');
if ( ! pass1 ) {
$('#pass-strength-result').html( pwsL10n.empty );
return;
}
strength = wp... | JavaScript |
/* global postboxes, deleteUserSetting, setUserSetting, getUserSetting */
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... | JavaScript |
/* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */
var setCommentsList, theList, theExtraList, commentReply,
toggleWithKeyboard = false;
(function($) {
var getCount, updateCount, updatePending, dashboardTotals;
setCommentsList = function() {
var totalInput, perPageInput, pageInput... | JavaScript |
/* global switchEditors, autosaveL10n, tinymce, ajaxurl, wpAjax, makeSlugeditClickable, wpCookies */
var autosave, autosavePeriodical, fullscreen, doPreview,
autosaveLast = '',
autosaveDelayPreview = false,
notSaved = true,
blockSave = false,
autosaveLockRelease = true;
jQuery(document).ready( function($) {
if ... | JavaScript |
/* global plupload, pluploadL10n, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting */
/* global resize_width, resize_height, shortform */
var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
// progress and success handlers for media multi uploads
... | JavaScript |
/* global pluploadL10n, plupload, _wpPluploadSettings */
window.wp = window.wp || {};
(function( exports, $ ) {
var Uploader;
if ( typeof _wpPluploadSettings === 'undefined' )
return;
/**
* An object that helps create a WordPress uploader using plupload.
*
* @param options - object - The options passed t... | JavaScript |
window.wp = window.wp || {};
(function ($) {
// Create the WordPress Backbone namespace.
wp.Backbone = {};
// wp.Backbone.Subviews
// --------------------
//
// A subview manager.
wp.Backbone.Subviews = function( view, views ) {
this.view = view;
this._views = _.isArray( views ) ? { '': views } : views ||... | 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 |
/* global ajaxurl, tinymce, wpLinkL10n, tinyMCEPopup, setUserSetting, wpActiveEditor */
var wpLink;
(function($){
var inputs = {}, rivers = {}, ed, River, Query;
wpLink = {
timeToTriggerRiver: 150,
minRiverAJAXDuration: 200,
riverBottomThreshold: 5,
keySensitivity: 100,
lastSearch: '',
textarea: '',
... | JavaScript |
/* global _wpCustomizeLoaderSettings */
window.wp = window.wp || {};
(function( exports, $ ){
var api = wp.customize,
Loader;
$.extend( $.support, {
history: !! ( window.history && history.pushState ),
hashchange: ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7)... | JavaScript |
var 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;
... | JavaScript |
/* global adminpage */
// Interim login dialog
(function($){
var wrap, next;
function show() {
var parent = $('#wp-auth-check'),
form = $('#wp-auth-check-form'),
noframe = wrap.find('.wp-auth-fallback-expired'),
frame, loaded = false;
if ( form.length ) {
// Add unload confirmation to counter (frame... | JavaScript |
// Ensure the global `wp` object exists.
window.wp = window.wp || {};
(function($){
var views = {},
instances = {};
// Create the `wp.mce` object if necessary.
wp.mce = wp.mce || {};
// wp.mce.view
// -----------
// A set of utilities that simplifies adding custom UI within a TinyMCE editor.
// At its core,... | JavaScript |
/* global wpPointerL10n */
/**
* Pointer jQuery widget.
*/
(function($){
var identifier = 0,
zindex = 9999;
$.widget('wp.pointer', {
options: {
pointerClass: 'wp-pointer',
pointerWidth: 320,
content: function() {
return $(this).text();
},
buttons: function( event, t ) {
var close = ( wp... | JavaScript |
/* global userSettings */
/* exported getUserSetting, setUserSetting, deleteUserSetting */
// utility functions
var wpCookies = {
// The following functions are from Cookie.js class in TinyMCE, Moxiecode, used under LGPL.
each : function(obj, cb, scope) {
var n, l;
if ( !obj )
return 0;
scope = scope || o... | 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 |
/*
SWFUpload.SWFObject Plugin
Summary:
This plugin uses SWFObject to embed SWFUpload dynamically in the page. SWFObject provides accurate Flash Player detection and DOM Ready loading.
This plugin replaces the Graceful Degradation plugin.
Features:
* swfupload_load_failed_hander event
* swfupload_pre_load_... | JavaScript |
/*
Cookie Plug-in
This plug in automatically gets all the cookies for this site and adds them to the post_params.
Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params.
The cookies will override any other post params with the same name.
*/
var SWFUpload;
... | JavaScript |
/*
Queue Plug-in
Features:
*Adds a cancelQueue() method for cancelling the entire queue.
*All queued files are uploaded when startUpload() is called.
*If false is returned from uploadComplete then the queue upload is stopped.
If false is not returned (strict comparison) then the queue upload is continued.
... | JavaScript |
/*
Speed Plug-in
Features:
*Adds several properties to the 'file' object indicated upload speed, time left, upload time, etc.
- currentSpeed -- String indicating the upload speed, bytes per second
- averageSpeed -- Overall average upload speed, bytes per second
- movingAverageSpeed -- Speed over averaged... | JavaScript |
/*!
* hoverIntent r7 // 2013.03.11 // jQuery 1.9.1+
* http://cherne.net/brian/resources/jquery.hoverIntent.html
*
* You may use hoverIntent under the terms of the MIT license. Basically that
* means you are free to use hoverIntent as long as this header is left intact.
* Copyright 2007, 2013 Brian Cherne
*/
/* ... | JavaScript |
/*
* imgAreaSelect jQuery plugin
* version 0.9.10
*
* Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://odyniec.net/projects/imgareaselect/
*
*/
(function($) {
/*
* Math functions will be used exten... | JavaScript |
/* global tinyMCEPreInit, tinymce */
(function(){
if ( typeof tinyMCEPreInit === 'undefined' )
return;
var t = tinyMCEPreInit, baseurl = t.base, markDone = tinymce.ScriptLoader.markDone, lang = t.ref.language,
theme = t.ref.theme, plugins = t.ref.plugins, suffix = t.suffix;
markDone( baseurl+'/langs/'+lang+'.j... | JavaScript |
/**
* TinyMCE Schema.js
*
* Duck-punched by WordPress core to support a sane schema superset.
*
* Copyright, Moxiecode Systems AB
* Released under LGPL
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
(function(tinymce) {
var mapCache = {}, makeMap = tinymce... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.