Skip to content
This repository was archived by the owner on May 15, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,22 @@ All options are, um, optional, but Reloadr won't actually *do* anything if you d

This is kind of a quick and dirty hack. I'd like to add some features to make usage easier, but still keep it simple. Here are some ideas:

- Scan the document's HEAD to find CSS and JS urls to poll.
- Scan the document's HEAD to find CSS and JS urls to poll.
- To this effect, you probably already have jQuery loaded for your project. If so, you can automatically scan for CSS/JS and feed it to reloadr:

$(document).ready( function() {
var clientResources = Array();
$("link[type='text/css'], script[type='text/javascript']").each( function(i,el) {
loc = el.href || el.src;
if (loc.match(/yourdomain.tld/)) clientResources.push(loc);
});
Reloadr.go({
frequency: 1000,
path: "path/reloadr.php",
client: clientResources,
server: [
"*.php"
]
});
});