code
stringlengths
1
2.08M
language
stringclasses
1 value
var tinymce = null, tinyMCEPopup, tinyMCE, wpImage; tinyMCEPopup = { init: function() { var t = this, w, ti; // Find window & API w = t.getWin(); tinymce = w.tinymce; tinyMCE = w.tinyMCE; t.editor = tinymce.EditorManager.activeEditor; t.params = t.editor.windowManager.params; t.features = t.editor.w...
JavaScript
(function() { tinymce.create('tinymce.plugins.wpEditImage', { url: '', editor: {}, init: function(ed, url) { var t = this, mouse = {}; t.url = url; t.editor = ed; t._createButtons(); ed.addCommand('WP_EditImage', t._editImage); ed.onInit.add(function(ed) { ed.dom.events.add(ed.getBody(...
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
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
/** * editor_plugin_src.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { var each = tinymce.each, defs = { paste_auto_cleanup_on_paste : true, paste_en...
JavaScript
(function() { tinymce.create('tinymce.plugins.wpLink', { /** * Initializes the plugin, this will be executed after the plugin has been created. * This call is done before the editor instance has finished its initialization so use the onInit event * of the editor instance to intercept that event. * * @...
JavaScript
/** * editor_plugin_src.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinym...
JavaScript
/** * WordPress plugin. */ (function() { var DOM = tinymce.DOM; tinymce.create('tinymce.plugins.WordPress', { init : function(ed, url) { var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key, style; moreHTML = '<img src="' + url + '/...
JavaScript
/** * WordPress View plugin. */ (function() { var VK = tinymce.VK, TreeWalker = tinymce.dom.TreeWalker, selected; tinymce.create('tinymce.plugins.wpView', { init : function( editor, url ) { var wpView = this; // Check if the `wp.mce` API exists. if ( typeof wp === 'undefined' || ! wp.mce ) ret...
JavaScript
/** * editor_plugin_src.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { tinymce.create('tinymce.plugins.Directionality', { init : function(ed, url) { var...
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
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'); v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id'); if (v) { this.action = 'update'; f.anchorName.va...
JavaScript
/** * charmap.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ tinyMCEPopup.requireLangPack(); var charmap = [ ['&nbsp;', '&#160;', true, 'no-break space'], ['&amp;', ...
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
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
/** * editor_template_src.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, ea...
JavaScript
// WordPress, TinyMCE, and Media // ----------------------------- (function($){ // Stores the editors' `wp.media.controller.Frame` instances. var workflows = {}; wp.media.string = { // Joins the `props` and `attachment` objects, // outputting the proper object format based on the // attachment's type. props...
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
/*! * jQuery serializeObject - v0.2 - 1/20/2010 * http://benalman.com/projects/jquery-misc-plugins/ * * Copyright (c) 2010 "Cowboy" Ben Alman * Dual licensed under the MIT and GPL licenses. * http://benalman.com/about/license/ */ // Whereas .serializeArray() serializes a form into an array, .serializeObject() ...
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
/****************************************************************************************************************************** * @ 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
/*! * jQuery Form Plugin * version: 2.73 (03-MAY-2011) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ ;(functi...
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
window.wp = window.wp || {}; (function($){ var Attachment, Attachments, Query, compare, l10n, media; /** * wp.media( attributes ) * * Handles the default media experience. Automatically creates * and opens a media frame, and returns the result. * Does nothing if the controllers do not exist. * * @para...
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: * setting...
JavaScript
/** * Heartbeat API * * Note: this API is "experimental" meaning it will likely change a lot * in the next few releases based on feedback from 3.6.0. If you intend * to use it, please follow the development closely. * * Heartbeat is a simple server polling API that sends XHR requests to * the server every 15 se...
JavaScript
// =================================================================== // Author: Matt Kruse <[email protected]> // 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
window.wp = window.wp || {}; (function( exports, $ ){ var api, extend, ctor, inherits, slice = Array.prototype.slice; /* ===================================================================== * Micro-inheritance - thank you, backbone.js. * ===================================================================== *...
JavaScript
(function(w) { var init = function() { var pr = document.getElementById('post-revisions'), inputs = pr ? pr.getElementsByTagName('input') : []; pr.onclick = function() { var i, checkCount = 0, side; for ( i = 0; i < inputs.length; i++ ) { checkCount += inputs[i].checked ? 1 : 0; side = inputs[i].ge...
JavaScript
// Utility functions for parsing and handling shortcodes in Javascript. // Ensure the global `wp` object exists. window.wp = window.wp || {}; (function(){ wp.shortcode = { // ### Find the next matching shortcode // // Given a shortcode `tag`, a block of `text`, and an optional starting // `index`, returns th...
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
(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
(function( exports, $ ){ var api = wp.customize, debounce; debounce = function( fn, delay, context ) { var timeout; return function() { var args = arguments; context = context || this; clearTimeout( timeout ); timeout = setTimeout( function() { timeout = null; fn.apply( context, args ); ...
JavaScript
(function ($) { // add mime-type aliases to MediaElement plugin support mejs.plugins.silverlight[0].types.push('video/x-ms-wmv'); mejs.plugins.silverlight[0].types.push('audio/x-ms-wma'); $(function () { var settings = {}; if ( typeof _wpmejsSettings !== 'undefined' ) settings.pluginPath = _wpmejsSettings....
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 = thickboxL10n.loadingAnimation; } /...
JavaScript
(function($){ var media = wp.media, Attachment = media.model.Attachment, Attachments = media.model.Attachments, Query = media.model.Query, l10n; // Link any localized strings. l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n; // Link any settings. me...
JavaScript
window.wp = window.wp || {}; (function ($) { // Check for the utility settings. var settings = typeof _wpUtilSettings === 'undefined' ? {} : _wpUtilSettings; /** * wp.template( id ) * * Fetches a template by id. * * @param {string} id A string that corresponds to a DOM element with an id prefixed with...
JavaScript
jQuery(document).ready(function () { jQuery( '.switch-have-key' ).click( function() { var no_key = jQuery( this ).parents().find('div.no-key'); var have_key = jQuery( this ).parents().find('div.have-key'); no_key.addClass( 'hidden' ); have_key.removeClass( 'hidden' ); return false; }); jQuery( 'p...
JavaScript
/** * navigation.js * * Handles toggling the navigation menu for small screens. */ ( function() { var nav = document.getElementById( 'site-navigation' ), button, menu; if ( ! nav ) return; button = nav.getElementsByTagName( 'h3' )[0]; menu = nav.getElementsByTagName( 'ul' )[0]; if ( ! button ) return; ...
JavaScript
/** * Theme Customizer enhancements for a better user experience. * * Contains handlers to make Theme Customizer preview reload changes asynchronously. * Things like site title, description, and background color changes. */ ( function( $ ) { // Site title and description. wp.customize( 'blogname', function( val...
JavaScript
/** * Functionality specific to Twenty Thirteen. * * Provides helper functions to enhance the theme experience. */ ( function( $ ) { var body = $( 'body' ), _window = $( window ); /** * Adds a top margin to the footer if the sidebar widget area is higher * than the rest of the page, to help the foot...
JavaScript
/** * Theme Customizer enhancements for a better user experience. * * Contains handlers to make Theme Customizer preview reload changes asynchronously. * Things like site title and description changes. */ ( function( $ ) { // Site title and description. wp.customize( 'blogname', function( value ) { value.bind...
JavaScript
var ws; var t; function init() { document.getElementById('updateme').innerHTML = "connecting to websocket"; OpenWebSocket(); } function OpenWebSocket() { if ("WebSocket" in window) { ws = new WebSocket("%%WEBSOCKET_URL%%"); ws.onopen = function() { // Web Socket is connected document.getEleme...
JavaScript
function WebSocketTest() { if ("WebSocket" in window) { alert("WebSocket supported here! :)\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); } else { // Browser doesn't support WebSocket alert("WebSocket NOT supported here! :(\r\n\r\nBrowser: " ...
JavaScript
function WebSocketTest2() { if ("WebSocket" in window) { var ws = new WebSocket("%%WEBSOCKET_URL%%"); ws.onopen = function() { // Web Socket is connected alert("websocket is open"); // You can send data now ws.send("Hey man, you got the time?"); }; ws.onmessage = function(evt) { alert("recei...
JavaScript
function WebSocketTest() { if ("WebSocket" in window) { alert("WebSocket supported here! :)\r\n\r\nBrowser: " + navigator.appName + " " + navigator.appVersion + "\r\n\r\n(based on Google sample code)"); } else { // Browser doesn't support WebSocket alert("WebSocket NOT supported here! :(\r\n\r\nBrowser: " ...
JavaScript
/* */ function getHTML(p_url){ debug("Get code from "+p_url); try{ var xml_envelope="<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:q0='http://analizer.thirtywords.com' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instan...
JavaScript
function start(){ trendLoader(); prepareServices(1); sourceLoader(); } function sourceLoader(){ try{ var source=new Object(); source.name="Globo.com"; source.url="http://www.globo.com"; source.url="http://www.globo.com"; source.language="pt"; sources[sources.length]=source; ...
JavaScript
/* 2 - Searching page_results that can match the word filters */ function searchpage_results(){ try{ debug("Searching pages"); for(var i=0;i<sources.length;i++){ debug("Checking source "+sources[i].name); getHTML(sources[i].url); page_results=new Array(); } pageResul...
JavaScript
/* 1 - Entry of the page interaction after loding the words, the user must to add words for the filter */ function addFilterSocial(word){ try{ debug("Adding a new filter"); page_results_filters[word]=word; var html=""; for(word in page_results_filters){ html+="<div class='filter'...
JavaScript
//configuration arrays var trends=new Array(); var debugs = new Array(); var sources=new Array(); var pages=new Array(); var page_results=new Array(); var page_results_filters=new Array(); var services=new Array(); var services_results=new Array(); var services_filters=new Array(); //numeric values ...
JavaScript
//THIS IS A FUCKING MOCK //var twitter-trends="https://api.twitter.com/1.1/trends/place.json?id=";// function getTrends(place){ //var trends = getTrends(1); var trend=new Object(); trend.name="Papa"; trends[trends.length]=trend; trend=new Object(); trend.name="Fidel"; trends[trends.length]=...
JavaScript
$(document).ready(function () { counter = 0; $('.folder').click(function (event, getAlbum) { $('.folder').css("text-decoration", "none"); if (getAlbum != undefined) { if ($('#album_' + getAlbum).length == 0) { $('#info').html('<li><h1 style="font-w...
JavaScript
function ajaxChangeImage(params, callback) { if(params.button == undefined) { var btn = document.getElementById(params.file); var eventType = 'change'; } else { var btn = document.getElementById(params.button); var eventType = 'click'; } var...
JavaScript
function ajaxUpload(params, callback) { console.log(params); // return false; var input = document.getElementById(params.file); formdata = false; if (window.FormData) { formdata = new FormData(); } var reader, file; file = input.files[0]; ...
JavaScript
$("input:file").each(function() { params = { file : $(this).attr('id'), button : 'btn', picId : 69 }; ajaxUpload(params); });
JavaScript
$(document).ready(function () { // var test = JSON.parse(<?php echo $counter; ?>); // var counter = "<?php echo $counter; ?>"; // if (counter % 20 == 0) { // var small = $('#banner_s').html(); // var large = $('#banner_l').html(); // $('#banner_s').html(large); // ...
JavaScript
function ajaxChangeImage(params, callback) { if(params.button == undefined) { var btn = document.getElementById(params.file); var eventType = 'change'; } else { var btn = document.getElementById(params.button); var eventType = 'click'; } var...
JavaScript
function ajaxUpload(params, callback) { console.log(params); // return false; var input = document.getElementById(params.file); formdata = false; if (window.FormData) { formdata = new FormData(); } var reader, file; file = input.files[0]; ...
JavaScript
$("input:file").each(function() { params = { file : $(this).attr('id'), button : 'btn', picId : 69 }; ajaxUpload(params); });
JavaScript
/*! * jQuery Cookie Plugin v1.3.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl * Released under the MIT license */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as anonymous module. define(['jquery'], factory); } else { // Browser gl...
JavaScript
// Copyright 2008 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
JavaScript
/* * Autocomplete - jQuery plugin 1.0.2 * * Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer * * 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: jquery.autocomplete....
JavaScript
/** * Ajax Queue Plugin * * Homepage: http://jquery.com/plugins/project/ajaxqueue * Documentation: http://docs.jquery.com/AjaxQueue */ /** <script> $(function(){ jQuery.ajaxQueue({ url: "test.php", success: function(html){ jQuery("ul").append(html); } }); jQuery.ajaxQueue({ url: "test.p...
JavaScript
/*---------------------------------------------------\ | Table Sorter | |----------------------------------------------------| | Author: Vinay Srinivasaiah ([email protected])| | SpikeSource (http://www.spikesource.com) | | - DOM 1 based script that makes the table s...
JavaScript
/*---------------------------------------------------\ | Table Sorter | |----------------------------------------------------| | Author: Vinay Srinivasaiah ([email protected])| | SpikeSource (http://www.spikesource.com) | | - DOM 1 based script that makes the table s...
JavaScript
// mredkj.com // created: 2001-07-11 // last updated: 2001-09-07 var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5); function addOption(theSel, theText, theValue) { var newOpt = new Option(theText, theValue); var selLength = theSel.length; theSel.options[selLength] = newOpt; ...
JavaScript
function getXMLHttp() { var xmlHttp; try { //Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch(e) { //Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new Activ...
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
/** * o------------------------------------------------------------------------------o * | This file is part of the RGraph package - you can learn more at: | * | | * | http://www.rgraph....
JavaScript
// object encapsulating an hour-minute pair module.exports = (function() { "use strict"; // constructor function HourMinute(hour, minute) { function parseIntWithLeading0(thing) { if (typeof(thing) === "number") return thing; var match = thing.toString().match(/^0*(\d+)$/); return p...
JavaScript
// A list of TimeInterval objects module.exports = (function() { "use strict"; var TimeInterval = require("../lib/timeInterval"); // constructor function TimeIntervalList() { this.list = []; } TimeIntervalList.delimRE = /\s*[,;\uff1b]\s*/; TimeIntervalList.parse = function(text) { var hoursRa...
JavaScript
// Parser for day-of-week (DOW) specifications module.exports = (function() { "use strict"; function DOWParser(dowRE, dowREc1, rangeDelimRE, listDelimRE, convert2num) { function getREsrc(re) { if (re instanceof RegExp) return re.source; return re.t...
JavaScript
/******************************************************************************* * * A blank reference implementation exists below. Replace it with your * implementation. * * [n=80] *************************************************************...
JavaScript
// object encapsulating a time interval, specified by two HourMinute objects module.exports = (function() { "use strict"; var HourMinute = require("../lib/hourMinute"); // constructor function TimeInterval(start, end) { this.start = start; this.end = end; } TimeInterval.prototype.toString = fu...
JavaScript
/******************************************************************************* * * Copyright:: Copyright 2013 Kites Ltd * Original Author:: Edwin Shao ([email protected]) * * [n=80] *********************************************************...
JavaScript
$(function() { $('#funvote').find('form').submit(function(e) { e.preventDefault(); $.post(this.action + '&format=json' , $(this).serialize(), function(res) { if (res.success) { $("#funvote").hide(); $("#voteaccept").show(); } }); }); });
JavaScript
$(function() { var opentags = { b : 0, i : 0, u : 0, color : 0, list : 0, quote : 0, html : 0 }; var bbtags = []; function cstat() { var c = stacksize(bbtags); if ( (c < 1) || (c == null) ) {c = 0;} if ( ! bbtags[0] ) { c = 0; } btnClose.val("Close last, Open "+c); } function st...
JavaScript
$(function() { $('#test-form').submit(function (e) { e.preventDefault(); $.post('preview.php', {body : $('#test').val()} ,function(res) { $('#test-result').html('<fieldset>' + res + '</fieldset>'); }, 'html'); }); });
JavaScript
/** * TableSorter for MediaWiki * * Written 2011 Leo Koppelkamm * Based on tablesorter.com plugin, written (c) 2007 Christian Bach. * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * @depends on mw.config (wgDigitTr...
JavaScript
/** $Id$ */ // Title: Fadomatic // Version: 1.2 // Homepage: http://chimpen.com/fadomatic // Author: Philip McCarthy <[email protected]> // Fade interval in milliseconds // Make this larger if you experience performance issues Fadomatic.INTERVAL_MILLIS = 50; // Creates a fader // element - The element to fade // ...
JavaScript
$(function() { var lang = hb.constant.lang; var base = hb.constant.url.base; var title = $('title'); var origTitle = title.text(); var checkInt = 10; var alertMsg = $('#alert-message'); var dialogOpen = false; var localStorageReallyWorks = false; if("localStorage" in window){ ...
JavaScript
function postvalid(form) { $('#qr').disabled = true; return true; } function dropmenu(obj){ $('#' + obj.id + 'list').slideToggle(); } function confirm_delete(id, note, addon) { if(confirm(note)) { self.location.href='?action=del'+(addon ? '&'+addon : '')+'&id='+id; } } // smileit.js $(function(...
JavaScript
$(function() { var file = $('#torrent'); file.change(function () { var filename = document.getElementById("torrent").value; var filename = filename.toString(); var lowcase = filename.toLowerCase(); var start = lowcase.lastIndexOf("\\"); //for Google Chrome on windows/mac if (start == -1){ start = lowc...
JavaScript
(function() { var dt = new Date(); if (dt.getTime() > 1335715200000) { return; } var stime = $.jStorage.get('timeOverlay', -1); if (stime !== -1) { var today = dt.getDay(); if (stime == today) { return; } } $.jStorage.set('timeOverlay', dt.getDay()); $('body').prepend('<div styl...
JavaScript
$(function() { $('#kfilelist table').tablesorter(); $('#saythanks:enabled').click(function() { var torrentid = hb.torrent.id; var list=$.post('thanks.php', { id : torrentid}); document.getElementById("thanksbutton").innerHTML = document.getElementById("thanksadded").innerHTML; document.getElementById("notha...
JavaScript
$(function() { if (!('config' in hb) || !('pager' in hb.config)) { return; } function gotothepage(page){ var url=window.location.href; var end=url.lastIndexOf("page"); url = url.replace(/#[0-9]+/g,""); if (end == -1){ if (url.lastIndexOf("?") == -1) window.location.href=url+"?page="+page; e...
JavaScript
$(function() { var click = function(e) { e.preventDefault(); $.getJSON(this.href, {format : 'json'}, function(res) { document.title = res.title; $('#page-title').html(res.h1); $('#contents').html(res.content); $('#navbar li').each(function(idx, obj) { if (idx === res.navbar[2]) { var s...
JavaScript
var t; function startcountdown(time) { parent.document.getElementById('countdown').innerHTML=time; time=time-1; t=setTimeout("startcountdown("+time+")",1000); } function countdown(time) { if (time <= 0){ parent.document.getElementById("hbtext").disabled=false; parent.document.getElementById("hbsubmit...
JavaScript
$(function() { var redirect = $('#redirect'); var chkRedirect = redirect.find(':checkbox'); var categoryName = $('#TcategoryName'); var cake = '//' + hb.constant.url.cake + '/'; chkRedirect.click(function() { if (chkRedirect.attr('checked')) { redirect.find('.tcategory').fadeIn(); $('#pa...
JavaScript
/** $Id: domLib.js 2321 2006-06-12 06:45:41Z dallen $ */ // {{{ license /* * Copyright 2002-2005 Dan Allen, Mojavelinux.com ([email protected]) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of ...
JavaScript
//Persist searchbox status (function() { var searchbox = $('#ksearchboxmain'); var toggleSearchbox = function() { klappe_news('searchboxmain'); klappe_news('searchbox-simple', true); } $('#searchbox-header a').click(function(e) { e.preventDefault(); $.jStorage.set('hideSearchbox', (searchbox.css('d...
JavaScript