pulsar/static/index.html
Kevin Sawicki dea0e08d93 Use hash instead of query string for parameters
This allows the pathToOpen to be changed when the project
path changes.

Previously if the untitled window file was saved, the project
path would be forever associated with the undefined window.

Now when the project path changes, the pathToOpen changes so
that the state is persisted to the project area and the untitled
window never has a project.
2013-06-07 10:50:06 -07:00

34 lines
920 B
HTML

<!DOCTYPE html>
<html style="background: #333">
<head>
<title></title>
<script>
window.location.params = {}
var params = window.location.hash.substring(1).split('&')
params.forEach(function(param) {
var pair = param.split("=");
window.location.params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
});
window.resourcePath = window.location.params.resourcePath;
var bootstrapScript = window.location.params.bootstrapScript;
window.onload = function() {
try {
require('coffee-script');
require('coffee-cache').setCacheDir('/tmp/atom-coffee-cache');
if (bootstrapScript) require(bootstrapScript);
}
catch (error) {
var currentWindow = require('remote').getCurrentWindow();
currentWindow.openDevTools();
console.error(error.stack || error);
}
}
</script>
</head>
<body>
</body>
</html>