CURRENT:
{
"flashVersion": "WIN 11,2,000",
"text": "Blah blah blah"
}
(function($) { | |
var nonBooleanOptions = ['indent', 'maxparams', 'maxdepth', 'maxstatements', 'maxcomplexity', 'maxlen']; | |
function clarifyDocs() { | |
var $ = window.jQuery; | |
var selectorExceptions = $.map(nonBooleanOptions, function(e) { | |
return ':not(:contains("' + e + '"))'; | |
}).join(''); | |
var selector = '.content > table tr:has(> td.name' + selectorExceptions+ ') > td.desc > p:first-child'; | |
$(selector).each(function() { |
CURRENT:
{
"flashVersion": "WIN 11,2,000",
"text": "Blah blah blah"
}
Picture a [non-modular] folder structure like this:
root/
- Gruntfile.js
- node_modules/
- Platform/
- Gruntfile.js
- ...
- Products/
var page = require("webpage").create(); | |
page.onConsoleMessage = function(msg) { | |
console.log('[PAGE] Message: ' + msg); | |
}; | |
page.open("http://google.com/", function(status) { | |
if (status !== "success") { | |
console.error("Failed to load the page. Usually this means some resource failed to load."); | |
phantom.exit(1); |
var btn = document.getElementById("copy-button"); | |
btn.addEventListener("click", clickHandler, false); | |
btn.addEventListener("copy", copyHandler, false); | |
function clickHandler(e) { | |
e.target.dispatchEvent(new ClipboardEvent("copy")); | |
} | |
function copyHandler(e) { | |
e.clipboardData.setData("text/plain", "Simulated copy. Yay!"); |
var btn = document.getElementById("copy-button"); | |
btn.addEventListener("click", clickHandler, false); | |
function clickHandler(e) { | |
var clip = new ClipboardEvent("copy"); | |
clip.clipboardData.setData("text/plain", "foo"); | |
clip.clipboardData.setData("text/html", "<b>foo</b>"); | |
// CRITICAL: Must call `preventDefault();` to get this data into the system/desktop clipboard!!! | |
clip.preventDefault(); |
/*global QUnit, window, global */ | |
(function (QUnit, global) { | |
'use strict'; | |
var document = global && global.document; | |
var pendingTestIds = []; | |
var QUnit_test = QUnit.test; | |
QUnit.test = function(testName, expected, callback, async) { |
Working draft of the API for the new ZeroClipboard "Core" sub-module in v2.0.0. This sub-module only provides the core Flash and clipboard injection facilities but none of the DOM, "Client", resizing, repositioning, etc. logic/code.
NOTE: A checked checkbox means that line item has already been implemented in the latest ZeroClipboard master
branch.
https://gist.github.com/JamesMGreene/3ded0f6e7f0a658b9394
window.onerror = function(msg, url, lineno, colno, error) {
// `window.onerror` handlers now have a 5th argument: the `Error` object itself (or `null`).
// This can then be used to get stack info, error type/name, etc.
};