浏览代码

Change URL on clone

Frédérik Paradis 14 年之前
父节点
当前提交
7cb345001a
共有 1 个文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      js/zerobin.js

+ 4 - 0
js/zerobin.js

@@ -328,6 +328,10 @@ function stateExistingPaste() {
  */
  */
 function clonePaste() {
 function clonePaste() {
     stateNewPaste();
     stateNewPaste();
+    
+    //Erase the id and the key in url
+    history.replaceState(document.title, document.title, scriptLocation());
+    
     showStatus('');
     showStatus('');
     $('textarea#message').text($('div#cleartext').text());
     $('textarea#message').text($('div#cleartext').text());
 }
 }