Use window.location.hash for the permanent link
authorJoachim Breitner <mail@joachim-breitner.de>
Tue, 1 Mar 2011 14:02:08 +0000 (14:02 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Tue, 1 Mar 2011 14:02:08 +0000 (14:02 +0000)
sm.html

diff --git a/sm.html b/sm.html
index a27327b..66e731d 100644 (file)
--- a/sm.html
+++ b/sm.html
@@ -66,9 +66,7 @@ function adjust() {
         
        //test.innerHTML = newHeight + " " + window.innerHeight + " " + fontSize;
        
-       link = document.getElementById("permlink");
-       href = window.location.href.replace(/\#.*/,"");
-       link.href = href + "#t=" + encodeURIComponent(ta.value);
+       href = window.location.hash = "#t=" + encodeURIComponent(ta.value);
 }
 
 function showBox() {
@@ -122,9 +120,6 @@ For more information about the original program, see what <a href="http://debada
 <p>
 <strong>screen-message</strong> was created by <a href="http://www.joachim-breitner.de/">Joachim Breitner</a>.
 </p>
-<p>
-Use <a id="permlink">this link</a> to share your current text.
-</p>
 </div>
 </body>
 </html>