Skip to content

Commit

Permalink
Hide footer in readonly mode
Browse files Browse the repository at this point in the history
  • Loading branch information
bokub committed Jun 15, 2020
1 parent b69c30a commit 8e0cb75
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ const enableLineWrapping = () => {
};

const openInNewTab = () => {
window.open(location.href.replace('&readonly', ''));
window.open(location.href.replace(/[?&]readonly/, ''));
};

// Build a shareable URL
3 changes: 2 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
@@ -36,7 +36,8 @@ footer {
select,
#copy:not(.hidden) + #controls,
body.readonly .hide-readonly,
body:not(.readonly) .show-readonly {
body:not(.readonly) .show-readonly,
body.readonly:not(:hover) #footer {
display: none;
}

0 comments on commit 8e0cb75

Please sign in to comment.