uploaded new name
This commit is contained in:
@@ -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');
|
||||
Reference in New Issue
Block a user