Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

Commit

Permalink
Merge pull request #26 from skeeto/master
Browse files Browse the repository at this point in the history
Fix problems with URLs including special characters
  • Loading branch information
netguy204 committed May 1, 2015
2 parents 5f6205f + 517862f commit 2ddfc63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions impatient-mode.el
Expand Up @@ -119,8 +119,9 @@ buffer."
"Visit the buffer in a browser."
(interactive)
(impatient-mode)
(browse-url (format "http://%s:%d/imp/live/%s"
system-name httpd-port (buffer-name))))
(browse-url
(format "http://%s:%d/imp/live/%s/"
(system-name) httpd-port (url-hexify-string (buffer-name)))))

(defun imp-buffer-enabled-p (buffer)
"Return t if buffer has impatient-mode enabled."
Expand Down
4 changes: 2 additions & 2 deletions index.html
Expand Up @@ -96,8 +96,8 @@
// now we need to tweak the stylesheet links so that firefox will refresh them properly
$('link', frameToDocument(iframeJQ[0])).each(function(index, el) {
var href = $(el).attr('href');
// don't refresh the random data:text stylesheets that chrome inserts
if(href && href.indexOf('data:text') != 0) {
// Only refresh impatient-mode hosted content
if(href && !/^[a-zA-z]+:\/\//.exec(href)) {
$(el).attr('href', $(el).attr('href') + '?' + new Date().getTime());
}
});
Expand Down

0 comments on commit 2ddfc63

Please sign in to comment.