ondemand icon indicating copy to clipboard operation
ondemand copied to clipboard

Update missing_home_directory.html to use JavaScript with a query param to display missing home directory

Open ericfranz opened this issue 5 years ago • 0 comments

So instead of the default page saying:

Your home directory appears to be missing.

It could say:

Your home directory at /users/PZS0562/efranz appears to be missing.

This is more complex to implement after #19 is because we would want to pass the same query params to the custom location and have those be passed to the default appropriately.

Also, we would want to follow guidelines https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Safely_inserting_external_content_into_a_page, perhaps by having the page have a placeholder like:

<p>Your home directory <span id="homedir"></span> appears to be missing.</p>

And then we could have JavaScript at the bottom of the page like:

var homedir = (new URLSearchParams(document.location.search.substring(1)).get("homedir");
if(homedir){
  var span = document.getElementById("homedir");
  span.textContent = "at " +homedir;
}

┆Issue is synchronized with this Asana task by Unito

ericfranz avatar Dec 19 '18 14:12 ericfranz