code
stringlengths
1
2.08M
language
stringclasses
1 value
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * The Original Code is Ajax.org Code Editor (ACE). * * Contributor(s): * Jonathan Camile <jonathan.camile AT gmail DOT com> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/range'], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var Tokenizer = require("../tokenizer").Tokenizer; va...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) { var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; var Tokenizer = require("../tokenizer").Tokeni...
JavaScript
define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) { var oop = require("../lib/oop"); var ...
JavaScript
"no use strict"; var console = { log: function(msg) { postMessage({type: "log", data: msg}); } }; var window = { console: console }; var normalizeModule = function(parentId, moduleName) { // normalize plugin requires if (moduleName.indexOf("!") !== -1) { var chunks = moduleName.spl...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Softw...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Softw...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) { var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; var Tokenizer = require("../tokenizer").Tokenize...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) { var oop = require("../lib/oop"); var T...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Softw...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MP...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * The Original Code is Ajax.org Code Editor (ACE). * * Contributor(s): * Jonathan Camile <jonathan.camile AT gmail DOT com> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * The Original Code is Ajax.org Code Editor (ACE). * * Contributor(s): * Meg Sharkey <megshark AT gmail DOT com> * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser...
JavaScript
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * * Softw...
JavaScript
define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = r...
JavaScript
/* Copyright 2010 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 writing,...
JavaScript
/* Copyright 2010 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 writing,...
JavaScript
var Markdown; if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module Markdown = exports; else Markdown = {}; // The following text is included for historical reasons, but should // be taken with a pinch of salt; it's not all true anymore. ...
JavaScript
// needs Markdown.Converter.js at the moment (function () { var util = {}, position = {}, ui = {}, doc = window.document, re = window.RegExp, nav = window.navigator, SETTINGS = { lineLength: 72 }, // Used to work around some browser bugs where we c...
JavaScript
// Usage: // // var myConverter = new Markdown.Editor(myConverter, null, { strings: Markdown.local.fr }); (function () { Markdown.local = Markdown.local || {}; Markdown.local.fr = { bold: "Gras <strong> Ctrl+B", boldexample: "texte en gras", italic: "Italique <em> Ctrl+I", ...
JavaScript
exports.Converter = require("./Markdown.Converter").Converter; exports.getSanitizingConverter = require("./Markdown.Sanitizer").getSanitizingConverter;
JavaScript
(function () { var output, Converter; if (typeof exports === "object" && typeof require === "function") { // we're in a CommonJS (e.g. Node.js) module output = exports; Converter = require("./Markdown.Converter").Converter; } else { output = window.Markdown; Converter = outpu...
JavaScript
// NOTE: This is just a demo -- in a production environment, // be sure to spend a few more thoughts on sanitizing user input. // (also, you probably wouldn't use a get request) var http = require("http"), url = require("url"), querystring = require("querystring"), Converter = require("../../Markdown.Conve...
JavaScript
/* * jQuery LightSwitch plugin * @author admin@catchmyfame.com - http://www.catchmyfame.com * @version 1.0.1 * @date December 16, 2010 * @category jQuery plugin * @copyright (c) 2010 admin@catchmyfame.com (www.catchmyfame.com) * @license CC Attribution-Share Alike 3.0 - http://creativecommons.org/licenses/by-sa...
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 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
function addTorrentToqBittorrentWebUI(data, torrentname) { var target; if(data.substring(0,7) == "magnet:") target = "download"; else target = "upload"; var xhr = new XMLHttpRequest(); xhr.open("POST", "http"+((localStorage["hostsecure"]=='true')?"s":"")+"://"+localStorage["host"]+":"+localStorage["p...
JavaScript
function addTorrentToVuzeRemoteUI(data) { if(data.substring(0,7) == "magnet:") target = "rpc"; else target = "upload?paused=false"; var xhr = new XMLHttpRequest(); xhr.open("POST", "http"+((localStorage["hostsecure"]=='true')?"s":"")+"://"+localStorage["host"]+":"+localStorage["port"]+"/transmission/"+target...
JavaScript
function addTorrentToruTorrentWebUI(data, label, dir) { if(label == undefined) label = localStorage["rutorrentlabel"]; if(dir == undefined) dir = localStorage["rutorrentdirectory"]; var xhr = new XMLHttpRequest(); var url = "http"; url += ((localStorage["hostsecure"]=='true')?"s":""); url += "://"; ...
JavaScript
function ut_handleResponse(data) { if(this.readyState == 4 && this.status == 200) { if(/\{"build":\d+\}/.test(this.responseText)) { displayResponse("Success", "Torrent added successfully."); } else { displayResponse("Failure", "Server didn't accept data:\n"+this.status+": "+this.responseText); } } ...
JavaScript
function addTorrentTopyrtWebUI(data, filename) { if(data.substring(0,7) == "magnet:") { displayResponse("Client Failure", "sorry, pyrt doesn't support magnet"); return; } var url = "http"+((localStorage["hostsecure"]=='true')?"s":"")+"://"+localStorage["host"]+":"+localStorage["port"]+"/"; // log in to ...
JavaScript
function addTorrentToBuffaloWebUI(data, torrentname) { if(data.substring(0,7) == "magnet:") { displayResponse("Client Failure", "Link sending not implemented (due to lack of testing equipment)."); return; } var xhr = new XMLHttpRequest(); xhr.open("POST", "http://"+localStorage["host"]+":"+localStorage...
JavaScript
function addTorrentToTransmissionWebUI(torrentdata) { sendXHRTransmissionWebUI(torrentdata, ""); } function sendXHRTransmissionWebUI(torrentdata, sessionid) { // for proper base64 encoding, this needs to be shifted into a 8 byte integer array var data = new ArrayBuffer(torrentdata.length); var ui8a = new Ui...
JavaScript
function addTorrentToVuzeSwingUI(data) { if(data.substring(0,7) == "magnet:") { displayResponse("Client Failure", "sorry, no magnet/link adding support from vuze swing ui. try the vuze remote plugin."); return; } var xhr = new XMLHttpRequest(); xhr.open("POST", "http://"+localStorage["host"]+":"+localS...
JavaScript
function addTorrentToDelugeWebUI(torrentdata, filename) { var rnd = Math.floor(Math.random()*999999); var xhr = new XMLHttpRequest(); xhr.open("POST", "http://"+localStorage["host"]+":"+localStorage["port"]+"/json", false); xhr.send(JSON.stringify({"id":rnd,"method": "auth.login", "params":[localStorage["passwo...
JavaScript
function vhtml_handleResponse(data) { if(this.readyState == 4 && this.status == 200) { if(/.*loaded successfully.*/.exec(this.responseText)) { displayResponse("Success", "Torrent added successfully."); } else { displayResponse("Failure", "Server didn't accept data:\n"+this.status+": "+this.responseText)...
JavaScript
function addTorrentToTorrentfluxWebUI(torrentdata, torrentname) { if(torrentdata.substring(0,7) == "magnet:") { displayResponse("Client Failure", "sorry, but torrentflux doesn't support magnet links."); return; } var loginurl = "http"+((localStorage["hostsecure"]=='true')?"s":"")+"://"+localStorage["host...
JavaScript
XMLHttpRequest.prototype.sendAsBinary = function(datastr) { var bb; // workaround to get the extension working in old & new chrome versions: http://googlechromereleases.blogspot.com/2011/04/beta-channel-update_18.html try { bb = new BlobBuilder(); } catch(e) { bb = new WebKitBlobBuilder(); } var data = new...
JavaScript
function b64_encode(input) { var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; while (i < input.length) { chr1 = input[i++]; chr2 = input[i++]; chr3 = input[i++]; enc1 = chr1 >> 2; e...
JavaScript
chrome.extension.sendRequest({"action": "getStorageData"}, function(response) { if(response["catchfrompage"] != "true") return; // handle common links var links = new Array(); var rL = document.getElementsByTagName('a'); res = response["linkmatches"].split("~"); res.push("magnet:"); if(response["linkma...
JavaScript
$(document).ready(function(){ loadAllSettings(); $(function() { $("#tabs").tabs(); }); }); function loadAllSettings() { var e = document.getElementsByTagName("input"); for (key in e) { getSetting(e[key]); } // set client selection var clientopts = document.getElementById("client").getEleme...
JavaScript
// Import the needed java packages and classes importPackage(java.util); importClass(javax.swing.JOptionPane) function putDate() { TARGET.replaceSelection("This is a dummy proc that inserts the Current Date:\n" + new Date()); TARGET.replaceSelection("\nTab Size of doc = " + AU.getTabSize(TARGET)); }
JavaScript
/** * @authors Luke Mahe * @authors Eric Bidelman * @fileoverview TODO */ document.cancelFullScreen = document.webkitCancelFullScreen || document.mozCancelFullScreen; /** * @constructor */ function SlideDeck(el) { this.curSlide_ = 0; this.prevSlide_ = 0; this.config_ = null; t...
JavaScript
(function(window) { var ORIGIN_ = location.protocol + '//' + location.host; function SlideController() { this.popup = null; this.isPopup = window.opener; if (this.setupDone()) { window.addEventListener('message', this.onMessage_.bind(this), false); // Close popups if we reload the main window. win...
JavaScript
/* Copyright (C) 2011 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 writing, softwa...
JavaScript
/* * Hammer.JS * version 0.4 * author: Eight Media * https://github.com/EightMedia/hammer.js */ function Hammer(element, options, undefined) { var self = this; var defaults = { // prevent the default event or not... might be buggy when false prevent_default : false, css_hacks ...
JavaScript
require(['order!../slide_config', 'order!modernizr.custom.45394', 'order!prettify/prettify', 'order!hammer', 'order!slide-controller', 'order!slide-deck'], function(someModule) { });
JavaScript
var SLIDE_CONFIG = { // Slide settings settings: { title: 'Title Goes Here<br>Up To Two Lines', subtitle: 'Subtitle Goes Here', //eventInfo: { // title: 'Google I/O', // date: '6/x/2013' //}, useBuilds: true, // Default: true. False will turn off slide animation builds. usePrettify...
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
//<![CDATA[ var relatedTitles = new Array(); var relatedTitlesNum = 0; var relatedUrls = new Array(); function related_results_labels(json) { for (var i = 0; i < json.feed.entry.length; i++) { var entry = json.feed.entry[i]; relatedTitles[relatedTitlesNum] = entry.title.$t; for (var k = 0; k < entry.link.length; k++) {...
JavaScript
/* * SimpleModal Basic Modal Dialog * http://simplemodal.com * * Copyright (c) 2013 Eric Martin - http://ericmmartin.com * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php */ jQuery(function ($) { // Load dialog on page load //$('#basic-modal-content').modal(); // Lo...
JavaScript
/* * SimpleModal Basic Modal Dialog * http://simplemodal.com * * Copyright (c) 2013 Eric Martin - http://ericmmartin.com * * Licensed under the MIT license: * http://www.opensource.org/licenses/mit-license.php */ jQuery(function ($) { // Load dialog on page load //$('#basic-modal-content').modal(); // Lo...
JavaScript
var timerlen = 5; var slideAniLen = 250; var timerID = new Array(); var startTime = new Array(); var obj = new Array(); var endHeight = new Array(); var moving = new Array(); var dir = new Array(); function slidedown(objname){ if(moving[objname]) return; if(document.getEle...
JavaScript
(function($) { $.fn.paginate = function(options) { var opts = $.extend({}, $.fn.paginate.defaults, options); return this.each(function() { $this = $(this); var o = $.meta ? $.extend({}, opts, $this.data()) : opts; var selectedpage = o.start; $.fn.draw(o,$this,selectedpage); }); }; var ou...
JavaScript
function ajaxSlide(id, url){ $.get(url, function(data) { if(document.getElementById(id).style.display == 'none') { document.getElementById(id).innerHTML = data; $("#"+id).slideDown(500); } else { $("#"+id).slideUp(500, function() { document.getElementById(id).innerHTML = data; $("#"...
JavaScript
function onlyNumbers(evt) { var e = event || evt; // for trans-browser compatibility var charCode = e.which || e.keyCode; if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } function tblshowhide(id, imgid, url) { if(document.getElementById(id)...
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