code
stringlengths
1
2.08M
language
stringclasses
1 value
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 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
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
(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' != typeof isRtl && ...
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'; 'html' is used for the "Text" editor tab. id = id || 'content'; mode = mode || 't...
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
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
window.wp = window.wp || {}; (function($) { var revisions; revisions = wp.revisions = { model: {}, view: {}, controller: {} }; // Link settings. revisions.settings = _.isUndefined( _wpRevisionsSettings ) ? {} : _wpRevisionsSettings; // For debugging revisions.debug = false; revisions.log = function() { if...
JavaScript
function showInstalls(event) { var pos = $("#mittregnskap").offset(); var height = $("#mittregnskap").outerHeight(); $("#installs").css( { position : 'absolute', "left" : (pos.left) + "px", "top" : (pos.top + height) + "px" }); $("#installs").show(); } function hideInstalls(event) { $("#installs").delay(10...
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
/* 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
/* 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
/* 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
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 ( jQuery('form.type-form #media-items').children().length == 1 && j...
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
/** * jquery.Jcrop.js v0.9.8 * jQuery Image Cropping Plugin * @author Kelly Hallman <khallman@gmail.com> * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{ * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * fil...
JavaScript
/** * Jcrop v.0.9.8 (minimized) * (c) 2008 Kelly Hallman and DeepLiquid.com * More information: http://deepliquid.com/content/Jcrop.html * Released under MIT License - this header must remain with code */ (function($){$.Jcrop=function(obj,opt) {var obj=obj,opt=opt;if(typeof(obj)!=='object')obj=$(obj)[0];if(typeo...
JavaScript
/* * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ * * Copyright (C) 2006 Fernando M.A.d.S. <fermads@gmail.com> * * This program is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by ...
JavaScript
/* * CodePress regular expressions for PHP syntax highlighting */ // PHP Language.syntax = [ { input : /(&lt;[^!\?]*?&gt;)/g, output : '<b>$1</b>' }, // all tags { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags { input : /(&lt;script.*?&gt;)(.*?)...
JavaScript
/* * CodePress regular expressions for Perl syntax highlighting */ // Ruby Language.syntax = [ { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /([\$\@\%]+)([\w\.]*)/g, output...
JavaScript
/* * CodePress regular expressions for CSS syntax highlighting */ // CSS Language.syntax = [ { input : /(.*?){(.*?)}/g,output : '<b>$1</b>{<u>$2</u>}' }, // tags, ids, classes, values { input : /([\w-]*?):([^\/])/g,output : '<a>$1</a>:$2' }, // keys { input : /\((.*?)\)/g,output : '(<s>$1</s>)' }, // parameters ...
JavaScript
/* * CodePress regular expressions for ASP-vbscript syntax highlighting */ // ASP VBScript Language.syntax = [ // all tags { input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' }, // style tags { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // script ta...
JavaScript
/* * CodePress regular expressions for HTML syntax highlighting */ // HTML Language.syntax = [ { input : /(&lt;[^!]*?&gt;)/g, output : '<b>$1</b>' }, // all tags { input : /(&lt;a .*?&gt;|&lt;\/a&gt;)/g, output : '<a>$1</a>' }, // links { input : /(&lt;img .*?&gt;)/g, output : '<big>$1</big>' }, // images { inpu...
JavaScript
/* * CodePress regular expressions for Java syntax highlighting */ // Java Language.syntax = [ { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>'}, // strings double quote { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote { input : /\b(abstract|continue|for|new|swi...
JavaScript
/* * CodePress regular expressions for Text syntax highlighting */ // plain text Language.syntax = [] Language.snippets = [] Language.complete = [] Language.shortcuts = []
JavaScript
/* * CodePress regular expressions for C# syntax highlighting * By Edwin de Jonge */ Language.syntax = [ // C# { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote { input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /\b(abstract|a...
JavaScript
/* * CodePress regular expressions for Perl syntax highlighting * By J. Nick Koston */ // Perl Language.syntax = [ { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /([\$\@...
JavaScript
/* * CodePress regular expressions for JavaScript syntax highlighting */ // JavaScript Language.syntax = [ { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /\b(break|continue...
JavaScript
/* * CodePress regular expressions for SQL syntax highlighting * By Merlin Moncure */ // SQL Language.syntax = [ { input : /\'(.*?)(\')/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /\b(add|after|aggregate|alias|all|and|as|authorization|between|by|cascade|cache|cache|called|case|check|column|c...
JavaScript
/* * CodePress regular expressions for generic syntax highlighting */ // generic languages Language.syntax = [ { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote { input : /\b(abstract|co...
JavaScript
/* * CodePress regular expressions for XSL syntax highlighting * By RJ Bruneel */ Language.syntax = [ // XSL { input : /(&lt;[^!]*?&gt;)/g, output : '<b>$1</b>' // all tags },{ input : /(&lt;a.*?&gt;|&lt;\/a&gt;)/g, output : '<a>$1</a>' // links },{ input : /(&lt;img .*?&gt;)/g, output : '<big>$1</big>' //...
JavaScript
/* * CodePress regular expressions for ASP-vbscript syntax highlighting */ // ASP VBScript Language.syntax = [ // all tags { input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' }, // style tags { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // script ta...
JavaScript
/* * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ * * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com> * * Contributors : * * Michael Hurni <michael.hurni@gmail.com> * * This program is free software; you can redistribute it and/or modify it under the...
JavaScript
/* * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ * * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com> * * Developers: * Fernando M.A.d.S. <fermads@gmail.com> * Michael Hurni <michael.hurni@gmail.com> * Contributors: * Martin D. Kirk * * This pr...
JavaScript
/* * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/ * * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com> * * Developers: * Fernando M.A.d.S. <fermads@gmail.com> * Michael Hurni <michael.hurni@gmail.com> * Contributors: * Martin D. Kirk * * This pr...
JavaScript
(function($) { var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList; wpList = { settings: { url: ajaxurl, type: 'POST', response: 'ajax-response', what: '', alt: 'alternate', altOffset: 0, addColor: null, delColor: null, dimAddColor: null, dimDelColor: null, c...
JavaScript
// script.aculo.us unittest.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // (c) 2005-2007 Jon Tirsen (http://www.tirsen.com) // (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/) // // script.aculo.us i...
JavaScript
// script.aculo.us slider.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 // Copyright (c) 2005-2007 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 scriptaculous.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007 // Copyright (c) 2005-2007 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 // "Soft...
JavaScript
// script.aculo.us sound.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007 // Copyright (c) 2005-2007 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.0, Tue Nov 06 15:01:40 +0300 2007 // Copyright (c) 2005-2007 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.0, Tue Nov 06 15:01:40 +0300 2007 // Copyright (c) 2005-2007 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
/** * hoverIntent is similar to jQuery's built-in "hover" function except that * instead of firing the onMouseOver event immediately, hoverIntent checks * to see if the user's mouse has slowed down (beneath the sensitivity * threshold) before firing the onMouseOver event. * * hoverIntent r5 // 2007.03.27 // jQuery 1.1...
JavaScript
var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', autosaveDelayPreview = false, notSaved = true, blockSave = false, interimLogin = false; jQuery(document).ready( function($) { var dotabkey = true; autosaveLast = $('#post #title').val() + $('#post #content').val(); autosavePeriodical = ...
JavaScript
/* http://www.JSON.org/json2.js 2009-08-17 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html This file creates a global JSON object containing two methods: stringify and parse. JSON.stringify(value, replacer, space) ...
JavaScript
/* * jQuery Form Plugin * version: 2.02 (12/16/2007) * @requires jQuery v1.1 or later * * Examples 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 * * Revision: $Id$ */ (functio...
JavaScript
/****************************************************************************************************************************** * @ Original idea by by Binny V A, Original version: 2.00.A * @ http://www.openjs.com/scripts/events/keyboard_shortcuts/ * @ Original License : BSD * @ jQuery Plugin by Tzury Bar Yocha...
JavaScript
(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+"...
JavaScript
/* * jQuery Color Animations * Copyright 2007 John Resig * Released under the MIT and GPL licenses. */ (function(jQuery){ // We override the animation for all of these color styles jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outli...
JavaScript
/* * jquery.suggest 1.1b - 2007-08-06 * Patched by Mark Jaquith with Alexander Dick's "multiple items" patch to allow for auto-suggesting of more than one tag before submitting * See: http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comment-7228 * * Uses code an...
JavaScript
(function($){ $.fn.filter_visible = function(depth) { depth = depth || 3; var is_visible = function() { var p = $(this), i; for(i=0; i<depth-1; ++i) { if (!p.is(':visible')) return false; p = p.parent(); } return true; } return this.filter(is_visible); }; $.table_hotkeys = function(table,...
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
/* * imgAreaSelect jQuery plugin * version 0.9.1 * * Copyright (c) 2008-2009 Michal Wojciechowski (odyniec.net) * * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://odyniec.net/projects/imgareaselect/ * */ (function($) { var abs = Math.abs, max = Math.max, ...
JavaScript
(function() { tinymce.create('tinymce.plugins.wpGallery', { init : function(ed, url) { var t = this; t.url = url; t._createButtons(); // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); ed.addCommand('WP_Gallery', function() { var el = ed.selecti...
JavaScript
/** * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. */ function writeFlash(p) { writeEmbed( 'D27CDB6E-AE6D-11cf-96B8-444553540000', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', 'application/x-shockwave...
JavaScript
tinyMCEPopup.requireLangPack(); var oldWidth, oldHeight, ed, url; if (url = tinyMCEPopup.getParam("media_external_list_url")) document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); function init() { var pl = "", f, val; v...
JavaScript
var tinymce = null, tinyMCEPopup, tinyMCE; tinyMCEPopup = { init: function() { var t = this, w, ti, li, q, i, it; li = ('' + document.location.search).replace(/^\?/, '').split('&'); q = {}; for (i=0; i<li.length; i++) { it = li[i].split('='); q[unescape(it[0])] = unescape(it[1]); } if (q.mce_rdom...
JavaScript
(function() { tinymce.create('tinymce.plugins.wpEditImage', { init : function(ed, url) { var t = this; t.url = url; t._createButtons(); // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); ed.addCommand('WP_EditImage', function() { var el = ed.sel...
JavaScript
tinyMCEPopup.requireLangPack(); var PasteWordDialog = { init : function() { var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; // Create iframe el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></if...
JavaScript
tinyMCEPopup.requireLangPack(); var PasteTextDialog = { init : function() { this.resize(); }, insert : function() { var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; // Convert linebreaks into paragraphs if (document.getElementById('linebreaks').checked) { lines = h.spli...
JavaScript
/** * WordPress plugin. */ (function() { var DOM = tinymce.DOM; tinymce.create('tinymce.plugins.WordPress', { mceTout : 0, init : function(ed, url) { var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML; moreHTML = '<img src="' + url + '/img/trans.gif"...
JavaScript
tinyMCE.addI18n({en:{ common:{ edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", apply:"Apply", insert:"Insert", update:"Update", cancel:"Cancel", close:"Close", browse:"Browse", class_name:"Class", not_set:"-- Not set --", clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", cl...
JavaScript
tinyMCEPopup.requireLangPack(); tinyMCEPopup.onInit.add(onLoadInit); function saveContent() { tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true}); tinyMCEPopup.close(); } function onLoadInit() { tinyMCEPopup.resizeToInnerSize(); // Remove Gecko spellchecking if (tin...
JavaScript
tinyMCEPopup.requireLangPack(); var charmap = [ ['&nbsp;', '&#160;', true, 'no-break space'], ['&amp;', '&#38;', true, 'ampersand'], ['&quot;', '&#34;', true, 'quotation mark'], // finance ['&cent;', '&#162;', true, 'cent sign'], ['&euro;', '&#8364;', true, 'euro sign'], ['&pound;', '&#16...
JavaScript
tinyMCEPopup.requireLangPack(); var AnchorDialog = { init : function(ed) { var action, elm, f = document.forms[0]; this.editor = ed; elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG'); v = ed.dom.getAttrib(elm, 'name'); if (v) { this.action = 'update'; f.anchorName.value = v; } f.insert.va...
JavaScript
var ImageDialog = { preInit : function() { var url; tinyMCEPopup.requireLangPack(); if (url = tinyMCEPopup.getParam("external_image_list_url")) document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); }, init : fun...
JavaScript
tinyMCEPopup.requireLangPack(); var LinkDialog = { preInit : function() { var url; if (url = tinyMCEPopup.getParam("external_link_list_url")) document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); }, init : functio...
JavaScript
tinyMCEPopup.requireLangPack(); function init() { var ed, tcont; tinyMCEPopup.resizeToInnerSize(); ed = tinyMCEPopup.editor; // Give FF some time window.setTimeout(insertHelpIFrame, 10); tcont = document.getElementById('plugintablecontainer'); document.getElementById('plugins_tab').style.display = 'none'; ...
JavaScript
tinyMCEPopup.requireLangPack(); var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false; var colors = [ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033", "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099", "#6600cc","#660...
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
// 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
/* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ if ( typeof tb_pathToImage != 'string' ) { var tb_pathToImage = "../wp-includes/js/thickbox/loading...
JavaScript
function toggleClass(element, className) { var e = ref(element); if (!e) return; if (hasClass(e, className)) { removeClass(e, className); } else { addClass(e, className); } } function hasClass(element, _className) { if (!element) { return; } var u...
JavaScript
jQuery(document).ready(function($) { // jsbn recommends the following $(window).click(rng_seed_time); $(window).keypress(rng_seed_time); }) var SemisecureLoginReimagined = { /** * @param string|Array passwords (passwords and names should have the same number of elements) * @param string|Array names (...
JavaScript
// ----------------------------------------------------------------------------------- // // Lightbox v2.04 // by Lokesh Dhakar - http://www.lokeshdhakar.com // Last Modification: 2/9/08 // // For more information, visit: // http://lokeshdhakar.com/projects/lightbox2/ // // Licensed under the Creative Commons Attributi...
JavaScript
/****************************************************************************** Name: Highslide JS Version: 4.1.8 (October 27 2009) Config: default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash Author: Torstein Hønsi Support: http://highslide...
JavaScript
(function($) { $.fn.tagGenerator = function(title, options) { var menu = $('<div class="tag-generator"></div>'); var selector = $('<span>' + title + '</span>'); selector.css({ border: '1px solid #ddd', padding: '2px 4px', background: '#fff url( ../wp-admin/images/fade-butt.png ) repeat-x 0 0', '-m...
JavaScript
jQuery(document).ready(function() { try { jQuery.extend(jQuery.tgPanes, _wpcf7.tagGenerators); jQuery('#taggenerator').tagGenerator(_wpcf7L10n.generateTag, { dropdownIconUrl: _wpcf7.pluginUrl + '/images/dropdown.gif' }); jQuery('input#wpcf7-title:enabled').css({ cursor: 'pointer' }); jQuery('input#wp...
JavaScript
jQuery(document).ready(function() { try { jQuery('div.wpcf7 > form').ajaxForm({ beforeSubmit: wpcf7BeforeSubmit, dataType: 'json', success: wpcf7ProcessJson }); } catch (e) { } try { jQuery('div.wpcf7 > form').each(function(i, n) { wpcf7ToggleSubmit(jQuery(n)); }); } catch (e) { } try { i...
JavaScript
// This JavaScript was developed by GA-Experts (http://www.ga-experts.co.uk) for Google Analytics // Please use this code to overwrite the default set of Search Engines in the GA tracking code // Use this code at your own risk. GA Experts takes no responsibility for errors, loss of data or any other complications aris...
JavaScript
jQuery(document).ready(function($) { $.fn.fadeToggle = function(speed, easing, callback) { return this.animate({opacity: "toggle"}, speed, easing, callback); }; $("a.gigpress-links-toggle").click(function() { var target = $(this).attr("href"); $(target).fadeToggle("fast"); $(this).toggleClass("gigpress-li...
JavaScript
$gp=jQuery.noConflict(); $gp(document).ready(function() { // If we're using the 12-hour clock, then do this magic if ( $gp('select#gp_hh.twelve').length > 0 ) { var time = $gp('select#gp_hh option:selected').parent().attr('label'); $gp('span#ampm').text(time); $gp('select#gp_hh.twelve').change(functi...
JavaScript
jQuery.noConflict(); jQuery(document).ready(function(){ jQuery("ul.sf-menu").supersubs({ minWidth: 12, // minimum width of sub-menus in em units maxWidth: 27, // maximum width of sub-menus in em units extraWidth: 1 ...
JavaScript
var showNotice, adminMenu, columns, validateForm; (function($){ // sidebar admin menu adminMenu = { init : function() { var menu = $('#adminmenu'); $('.wp-menu-toggle', menu).each( function() { var t = $(this), sub = t.siblings('.wp-submenu'); if ( sub.length ) t.click(function(){ adminMenu.toggle( sub ...
JavaScript
(function($){ function check_pass_strength() { var pass = $('#pass1').val(), user = $('#user_login').val(), strength; $('#pass-strength-result').removeClass('short bad good strong'); if ( ! pass ) { $('#pass-strength-result').html( pwsL10n.empty ); return; } strength = passwordStrength(pass, user); ...
JavaScript
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail; // 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 ( val && jQu...
JavaScript
(function($) { inlineEditTax = { init : function() { var t = this, row = $('#inline-edit'); t.type = $('#the-list').attr('className').substr(5); t.what = '#'+t.type+'-'; $('.editinline').live('click', function(){ inlineEditTax.edit(this); return false; }); // prepare the edit row row.keyup(fun...
JavaScript
function WPSetAsThumbnail(id){ 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, cookie: encodeURIComponent(document.cookie) }, function(str){ var win = window.dialogArguments || op...
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($) { 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
// $Id: farbtastic.js,v 1.2 2007/01/08 22:53:01 unconed Exp $ // Farbtastic 1.2 var farbtastic_click = false; jQuery.fn.farbtastic = function (callback) { jQuery.farbtastic(this, callback); return this; }; jQuery.farbtastic = function (container, callback) { var container = jQuery(container).get(0); return c...
JavaScript
// send html to the post editor function send_to_editor(h) { var ed; if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { ed.focus(); if ( tinymce.isIE ) ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); if ( h.indexOf('[caption') =...
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
var wpGears = { createStore : function() { if ( 'undefined' == typeof google || ! google.gears ) return; if ( 'undefined' == typeof localServer ) localServer = google.gears.factory.create("beta.localserver"); store = localServer.createManagedStore(this.storeName()); store.manifestUrl = "gears-manifest.p...
JavaScript
// Word count (function($) { wpWordCount = { init : function() { var t = this, last = 0, co = $('#content'); $('#wp-word-count').html( wordCountL10n.count.replace( /%d/, '<span id="word-count">0</span>' ) ); t.block = 0; t.wc(co.val()); co.keyup( function(e) { if ( e.keyCode == last ) return tru...
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
var postboxes; (function($) { postboxes = { add_postbox_toggles : function(page,args) { this.init(page,args); $('.postbox h3, .postbox .handlediv').click( function() { var p = $(this).parent('.postbox'), id = p.attr('id'); p.toggleClass('closed'); postboxes.save_state(page); if ( id ) { if...
JavaScript
var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad; jQuery(document).ready( function($) { // These widgets are sometimes populated via ajax ajaxWidgets = [ 'dashboard_incoming_links', 'dashboard_primary', 'dashboard_secondary', 'dashboard_plugins' ]; ajaxPopulateWidgets = function(el) { show = functio...
JavaScript
var theList, theExtraList, toggleWithKeyboard = false; (function($) { setCommentsList = function() { var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter; totalInput = $('.tablenav input[name="_total"]', '#comments-form'); perPageInput = $('.tablenav input...
JavaScript