From 094323ee586407d382cba684bb4e8d3a5eae0d7f Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 23 Aug 2007 06:45:42 +0000 Subject: [PATCH] Fixed broken deletion undo. --- static/js/Wiki.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 7a89139..a66e30e 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -192,16 +192,16 @@ Wiki.prototype.load_editor = function ( note_title, from_iframe_id, note_id, rev else pulldown.title_field.value = note_title; } - } - // if the title looks like a URL, then make it a link to an external site - if ( /^\w+:\/\//.test( note_title ) ) { - link.target = "_new"; - link.href = note_title; - window.open( link.href ); - return + // if the title looks like a URL, then make it a link to an external site + if ( /^\w+:\/\//.test( note_title ) ) { + link.target = "_new"; + link.href = note_title; + window.open( link.href ); + return + } + link.removeAttribute( "target" ); } - link.removeAttribute( "target" ); // if the note corresponding to the link's id is already open, highlight it and bail, but only if // we didn't pull a title from an open link pulldown