<!doctype html>
<meta charset="utf-8">
<title>Hash Handler</title>
<style>[hidden] { display: none; }</style>

<p>Experimental <code>hash:</code> protocol handler.</p>

<p id="pending">Pending...</p>
<p id="success" hidden>Protocol handler request submitted. If the handler isn't already registered, some sort of confirmation should have appeared.</p>
<p id="unsupported" hidden>The registerProtocolHandler API is not supported on this browser.</p>
<p id="exception" hidden>An exception occurred.</p>

<script>
if(navigator.registerProtocolHandler) {
	var resolver = window.location.origin+"/?q=%s";
	var title = "StrongLink repository";
	try {
		navigator.registerProtocolHandler("hash", resolver, title);
		document.getElementById("success").hidden = false;
	} catch(e) {
		console.log(e);
		document.getElementById("exception").hidden = false;
	}
} else {
	document.getElementById("unsupported").hidden = false;
}
document.getElementById("pending").hidden = true;
</script>


<!doctype html>
<meta charset="utf-8">
<title>Hash Handler</title>
<style>[hidden] { display: none; }</style>

<p>Experimental <code>hash:</code> protocol handler.</p>

<ul>
<li>Firefox on Linux: works well
<li>Firefox on OS X: only works from links within Firefox
<li>Chrome: custom protocols must be prefixed with "web+" in a misguided attempt at security
<li>Other configurations: not tested
</ul>

<p id="pending">Pending...</p>
<p id="success" hidden>Protocol handler request submitted. If the handler isn't already registered, some sort of confirmation should have appeared.</p>
<p id="unsupported" hidden>The registerProtocolHandler API is not supported on this browser.</p>
<p id="exception" hidden>An exception occurred.</p>

<script>
if(navigator.registerProtocolHandler) {
	var resolver = window.location.origin+"/?q=%s";
	var title = "StrongLink repository";
	try {
		navigator.registerProtocolHandler("hash", resolver, title);
		document.getElementById("success").hidden = false;
	} catch(e) {
		console.log(e);
		document.getElementById("exception").hidden = false;
	}
} else {
	document.getElementById("unsupported").hidden = false;
}
document.getElementById("pending").hidden = true;
</script>


Document hash handler browser support.
Document hash handler browser support.
