This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseHTMLtoDOM (html) { | |
var regexTags = /(<[a-zA-Z1-9]+(?:\s+[a-zA-Z-]+(?:=(?:".*?"|'.*?'))?)*\s*\/?>|<\/[a-zA-Z1-9]+>)/gm, // Match tags (opening incl. attributes & closing) | |
regexAttr = /(?:\s+([a-zA-Z-]+)(?:=(?:"(.*?)"|'(.*?)'))?)/gm; // Match attributes | |
var singletons = ['area','base','br','col','command','embed','hr','img','input','keygen','link','meta','param','source','track','wbr']; // HTML 5 - 6/9/2016 | |
html = html.replace(/ /g, '\u00A0'); // TODO: add more encoding fixes | |
var parts = html.split(regexTags), fragment = document.createDocumentFragment(), lastElement = fragment; | |
for (var i=0, il=parts.length; i<il; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Global variables | |
Set objShell = CreateObject("WScript.Shell") | |
Set objUser = CreateObject("ADSystemInfo") | |
Set objCurrentUser = GetObject("LDAP://" & objUser.UserName) | |
' Outlook signature location, for Outlook 2010, 2013 & 2016 | |
appData = objShell.ExpandEnvironmentStrings("%APPDATA%") | |
outlookSignatures = appData & "\Microsoft\Signatures" | |
' Signature locations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Mutation Listener</title> | |
<script src="mutationlistener.js"></script> | |
</head> | |
<body> | |
<div id="test"> | |
Existing content | |
</div> |