mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-21 07:58:04 +03:00
dea0e08d93
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.
34 lines
920 B
HTML
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>
|