Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy URL and discovery update #91

Merged
merged 3 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading