Skip to content

Commit

Permalink
Use new page instead of popup
Browse files Browse the repository at this point in the history
  • Loading branch information
nmuggli committed Nov 7, 2023
1 parent 294acb4 commit 74bc2a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions api-samples/printing/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

chrome.action.onClicked.addListener(() => {
chrome.tabs.create({
url: 'printers.html'
});
});
4 changes: 3 additions & 1 deletion api-samples/printing/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"version": "1.0",
"description": "Demonstrates all four methods of the chrome.printing namespace.",
"permissions": ["printing"],
"background": {
"service_worker": "background.js"
},
"action": {
"default_popup": "printers.html",
"default_icon": {
"16": "icons/icon16.png",
"48": "icons/icon48.png",
Expand Down

0 comments on commit 74bc2a3

Please sign in to comment.