This commit is contained in:
Dayowe 2025-06-08 23:09:10 +02:00
parent f1de59e368
commit 4d29490f0c

View File

@ -4,11 +4,11 @@
* by Canine Nutrition and Wellness - https://caninenutritionandwellness.com * by Canine Nutrition and Wellness - https://caninenutritionandwellness.com
* *
* Basic Usage: * Basic Usage:
* <script src="https://yourdomain.com/dog-calculator-widget.js"></script> * <script src="https://embedcaninenutritionandwellness.com/dog-calorie-calculator/dog-food-calculator-widget.js"></script>
* <div id="dog-calorie-calculator"></div> * <div id="dog-calorie-calculator"></div>
* *
* Advanced Usage with theme option: * Advanced Usage with theme option:
* <script src="https://yourdomain.com/dog-calculator-widget.js"></script> * <script src="https://embed/caninenutritionandwellness.com/dog-calorie-calculator/dog-food-calculator-widget.js"></script>
* <div id="dog-calorie-calculator" data-theme="dark"></div> * <div id="dog-calorie-calculator" data-theme="dark"></div>
* *
* Or with JavaScript: * Or with JavaScript:
@ -1552,7 +1552,7 @@
const embedUrl = `${protocol}//embed.${hostname}`; const embedUrl = `${protocol}//embed.${hostname}`;
const theme = this.theme !== 'system' ? ` data-theme="${this.theme}"` : ''; const theme = this.theme !== 'system' ? ` data-theme="${this.theme}"` : '';
widgetCode.textContent = `<script src="${embedUrl}/dog-calorie-calculator/dog-calculator-widget.js"></script> widgetCode.textContent = `<script src="${embedUrl}/dog-calorie-calculator/dog-food-calculator-widget.js"></script>
<div id="dog-calorie-calculator"${theme}></div>`; <div id="dog-calorie-calculator"${theme}></div>`;
iframeCode.textContent = `<iframe src="${embedUrl}/dog-calorie-calculator/iframe.html${this.theme !== 'system' ? '?theme=' + this.theme : ''}" iframeCode.textContent = `<iframe src="${embedUrl}/dog-calorie-calculator/iframe.html${this.theme !== 'system' ? '?theme=' + this.theme : ''}"