ref: https://superuser.com/questions/179064/how-to-remove-security-from-a-pdf-file
Download qpdf binaries from https://github.com/qpdf/qpdf/releases
qpdf-*-bin-msvc32.zip
and extract
//https://stackoverflow.com/questions/5796718/html-entity-decode | |
var decodeEntities = (function() { | |
// this prevents any overhead from creating the object each time | |
var element = document.createElement('div'); | |
function decodeHTMLEntities (str) { | |
if(str && typeof str === 'string') { | |
// strip script/html tags | |
str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, ''); | |
str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, ''); | |
element.innerHTML = str; |
// https://flaviocopes.com/how-to-determine-date-is-today-javascript/ | |
const isToday = (someDate) => { | |
const today = new Date() | |
someDate = new Date(someDate); | |
return someDate.getDate() == today.getDate() && | |
someDate.getMonth() == today.getMonth() && | |
someDate.getFullYear() == today.getFullYear() | |
} |
{ | |
"last_update": "2021-01-13", | |
"images": { | |
"0": "https://media.giphy.com/media/hQKiGV6MG8WmsHg2yx/giphy.gif", | |
"1": "https://media.giphy.com/media/Mtqip7Jor0DgAvzn6U/giphy.gif", | |
"2": "https://media.giphy.com/media/7XuKKmGiaxXe6EjOj4/giphy-downsized-large.gif", | |
"3": "https://media.giphy.com/media/3i7zenReaUuI0/giphy.gif", | |
"4": "https://media.giphy.com/media/DhstvI3zZ598Nb1rFf/giphy-downsized-large.gif", | |
"5": "https://media.giphy.com/media/LqafmeaBVxCRG/giphy.gif", | |
"6": "https://media.giphy.com/media/9Vvoj75o3ZsK6TRUqH/giphy.gif", |
ref: https://superuser.com/questions/179064/how-to-remove-security-from-a-pdf-file
Download qpdf binaries from https://github.com/qpdf/qpdf/releases
qpdf-*-bin-msvc32.zip
and extract
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
SetKeyDelay 5000 | |
^!v::Send {Raw}%Clipboard% ; CTRL + ALT + V |
// ==UserScript== | |
// @name Marks_New_Userscript | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Mark | |
// @match <$URL$> | |
// @icon <$ICON$> | |
// @resource TOASTIFY_CSS https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css | |
// @require https://cdn.jsdelivr.net/npm/toastify-js |
function createTableFromKeyValueArray(array) { | |
// https://niraeth.com/javascript-create-html-table-based-on-key-value-array/ | |
if( array.length <= 0 ) | |
return null; | |
var table = document.createElement('table'); | |
var keys = Object.keys(array[0]); | |
var thead = document.createElement("thead"); | |
var header_row = document.createElement('tr'); |
#NoEnv | |
Revision := 3 | |
ShowHelpScreen() | |
; | |
; App content here | |
; | |
^!x:: |