Skip to content

Commit

Permalink
Copy URL and discovery update (#91)
Browse files Browse the repository at this point in the history
* Copy URL and discovery update

* Added release notes to what's new page

* Updated package-lock.json
  • Loading branch information
exdis authored Apr 2, 2024
1 parent d144b6c commit 7eff4d0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.14.0

* Updated `discovery` to `1.0.0-beta.82`
* Renamed `report` page to `discovery`
* Added "Copy URL" button

## 1.13.5

* Updated `discovery` to `1.0.0-beta.81`
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jsondiscovery",
"version": "1.13.5",
"version": "1.14.0",
"description": "Browser (Chrome, Firefox) extension for JSON discovery",
"author": "[email protected]",
"license": "MIT",
Expand All @@ -11,7 +11,7 @@
"build": "NODE_ENV=production node ./scripts/build.js && node ./scripts/zip.js"
},
"devDependencies": {
"@discoveryjs/discovery": "1.0.0-beta.81",
"@discoveryjs/discovery": "1.0.0-beta.82",
"@discoveryjs/json-ext": "^0.5.7",
"css-tree": "^2.3.1",
"esbuild": "^0.20.1",
Expand Down
12 changes: 9 additions & 3 deletions src/discovery/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export default host => {
setWhatsnewViewed(host.context);
}
});
host.nav.append({
content: 'text:"Copy URL"',
onClick: () =>
copyText(window.location.toString()) &
flashMessage('URL copied to clipboard', 'success')
});
host.nav.append({
when: () => host.pageId !== 'default',
content: 'text:"Default view"',
Expand All @@ -22,9 +28,9 @@ export default host => {
}
});
host.nav.append({
when: () => host.pageId !== 'report',
content: 'text:"Make report"',
onClick: () => host.setPage('report')
when: () => host.pageId !== 'discovery',
content: 'text:"Discover"',
onClick: () => host.setPage('discovery')
});
host.nav.append({
when: () => host.pageId !== 'raw',
Expand Down
11 changes: 11 additions & 0 deletions src/discovery/pages/whatsnew.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 1.14.0

### Discover

- Report page renamed to "Discover"

### Misc

- Added "Copy URL" button
- Updated `discovery.js` to the `1.0.0-beta.82` version ([release notes](https://github.com/discoveryjs/discovery/releases/tag/v1.0.0-beta.82))

## 1.13.5

### Interface & Views
Expand Down

0 comments on commit 7eff4d0

Please sign in to comment.