uploaded new name
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Quality Recticel Print Service - Background Script
|
||||
* Quality Label Printing Service - Background Script
|
||||
* Handles communication between web pages and Windows print service
|
||||
*/
|
||||
|
||||
@@ -16,7 +16,7 @@ let serviceStatus = {
|
||||
|
||||
// Initialize extension
|
||||
chrome.runtime.onInstalled.addListener(() => {
|
||||
console.log('Quality Recticel Print Service extension installed');
|
||||
console.log('Quality Label Printing Service extension installed');
|
||||
checkServiceStatus();
|
||||
|
||||
// Set up periodic service check
|
||||
@@ -160,7 +160,7 @@ async function handlePrintPDF(printData) {
|
||||
chrome.notifications.create({
|
||||
type: 'basic',
|
||||
iconUrl: 'icons/icon48.png',
|
||||
title: 'Quality Recticel Print Service',
|
||||
title: 'Quality Label Printing Service',
|
||||
message: 'PDF printed successfully'
|
||||
});
|
||||
|
||||
@@ -176,7 +176,7 @@ async function handlePrintPDF(printData) {
|
||||
chrome.notifications.create({
|
||||
type: 'basic',
|
||||
iconUrl: 'icons/icon48.png',
|
||||
title: 'Quality Recticel Print Service',
|
||||
title: 'Quality Label Printing Service',
|
||||
message: `Print failed: ${error.message}`
|
||||
});
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Quality Recticel Print Service - Content Script
|
||||
* Quality Label Printing Service - Content Script
|
||||
* Injects print service functionality into web pages
|
||||
*/
|
||||
|
||||
// Only inject on Quality Recticel domains or localhost
|
||||
// Only inject on Quality Label Printing domains or localhost
|
||||
const allowedDomains = [
|
||||
'localhost',
|
||||
'127.0.0.1'
|
||||
@@ -11,11 +11,11 @@ const allowedDomains = [
|
||||
|
||||
const currentDomain = window.location.hostname;
|
||||
if (!allowedDomains.includes(currentDomain)) {
|
||||
console.log('Quality Recticel Print Service: Not injecting on', currentDomain);
|
||||
console.log('Quality Label Printing Service: Not injecting on', currentDomain);
|
||||
// return; // Commented out for development - remove in production
|
||||
}
|
||||
|
||||
console.log('Quality Recticel Print Service: Content script loaded');
|
||||
console.log('Quality Label Printing Service: Content script loaded');
|
||||
|
||||
// Inject print service API into the page
|
||||
const printServiceAPI = {
|
||||
@@ -87,7 +87,7 @@ const printServiceAPI = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Print labels with Quality Recticel specific formatting
|
||||
* Print labels with Quality Label Printing specific formatting
|
||||
*/
|
||||
async printLabels(orderData, quantity = 1) {
|
||||
try {
|
||||
@@ -118,10 +118,10 @@ window.QualityRecticelPrintService = printServiceAPI;
|
||||
// Inject into page context for better compatibility
|
||||
const script = document.createElement('script');
|
||||
script.textContent = `
|
||||
// Quality Recticel Print Service API
|
||||
// Quality Label Printing Service API
|
||||
window.QualityRecticelPrintService = ${JSON.stringify(printServiceAPI)};
|
||||
|
||||
// Enhanced print function for Quality Recticel
|
||||
// Enhanced print function for Quality Label Printing
|
||||
window.printQualityRecticelLabels = async function(orderData, quantity) {
|
||||
try {
|
||||
// Get the PDF blob from the server
|
||||
@@ -173,12 +173,12 @@ script.textContent = `
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Print Quality Recticel labels error:', error);
|
||||
console.error('Print Quality Label Printing labels error:', error);
|
||||
return { success: false, error: error.message };
|
||||
}
|
||||
};
|
||||
|
||||
console.log('Quality Recticel Print Service API injected');
|
||||
console.log('Quality Label Printing Service API injected');
|
||||
`;
|
||||
document.documentElement.appendChild(script);
|
||||
|
||||
@@ -229,4 +229,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
}));
|
||||
});
|
||||
|
||||
console.log('Quality Recticel Print Service: Content script initialized');
|
||||
console.log('Quality Label Printing Service: Content script initialized');
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Quality Recticel Print Service",
|
||||
"name": "Quality Label Printing Service",
|
||||
"version": "1.0.0",
|
||||
"description": "Silent PDF printing service for Quality Recticel application",
|
||||
"description": "Silent PDF printing service for Quality Label Printing application",
|
||||
|
||||
"permissions": [
|
||||
"activeTab",
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
"action": {
|
||||
"default_popup": "popup.html",
|
||||
"default_title": "Quality Recticel Print Service",
|
||||
"default_title": "Quality Label Printing Service",
|
||||
"default_icon": {
|
||||
"16": "icons/icon16.png",
|
||||
"32": "icons/icon32.png",
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="logo">QR</div>
|
||||
<div class="title">Quality Recticel Print Service</div>
|
||||
<div class="title">Quality Label Printing Service</div>
|
||||
<div class="version">Version 1.0.0</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Quality Recticel Print Service - Popup Script
|
||||
* Quality Label Printing Service - Popup Script
|
||||
* Manages the extension popup interface
|
||||
*/
|
||||
|
||||
@@ -224,7 +224,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
*/
|
||||
function showHelp() {
|
||||
const helpText = `
|
||||
Quality Recticel Print Service Help
|
||||
Quality Label Printing Service Help
|
||||
==================================
|
||||
|
||||
Installation:
|
||||
@@ -244,7 +244,7 @@ Troubleshooting:
|
||||
• Verify Chrome extension permissions
|
||||
• Check service logs: print_service.log
|
||||
|
||||
For support, contact the Quality Recticel development team.
|
||||
For support, contact the Quality Label Printing development team.
|
||||
`;
|
||||
|
||||
alert(helpText.trim());
|
||||
|
||||
Reference in New Issue
Block a user