I hereby claim:
- I am timdown on github.
- I am timdown (https://keybase.io/timdown) on keybase.
- I have a public key whose fingerprint is D48F D84D 2AA1 572A 1E6B 965A 0E1C 5774 5110 6790
To claim this, I am signing this object:
/** | |
* Prints a PDF in a browser using a hidden iframe. Works in recent versions of Firefox, Chrome, Safari and Edge. Does | |
* not work in IE 11 and instead attempts to open the PDF in a new tab. | |
* | |
* Note that the PDF URL must come from the same domain as the page including this file because of the same-origin | |
* policy. | |
* | |
* Usage: printPdf(url) | |
*/ | |
var printPdf = (function() { |
/** | |
* This is ported from Rangy's selection save and restore module and has no dependencies. | |
* Copyright 2019, Tim Down | |
* Licensed under the MIT license. | |
* | |
* Documentation: https://github.com/timdown/rangy/wiki/Selection-Save-Restore-Module | |
* Use "rangeSelectionSaveRestore" instead of "rangy" | |
*/ | |
var rangeSelectionSaveRestore = (function() { | |
var markerTextChar = "\ufeff"; |
var trimCanvas = (function() { | |
function rowBlank(imageData, width, y) { | |
for (var x = 0; x < width; ++x) { | |
if (imageData.data[y * width * 4 + x * 4 + 3] !== 0) return false; | |
} | |
return true; | |
} | |
function columnBlank(imageData, width, x, top, bottom) { | |
for (var y = top; y < bottom; ++y) { |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Class Applier module for Rangy. | |
* Adds, removes and toggles classes on Ranges and Selections | |
* | |
* Part of Rangy, a cross-browser JavaScript range and selection library | |
* https://github.com/timdown/rangy | |
* | |
* Depends on Rangy core. | |
* | |
* Copyright 2015, Tim Down |
/** | |
* Rough FileAppender implementation for log4javascript 1.4. | |
* | |
* Copyright 2013 Tim Down. | |
* | |
* 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 |