@customviews-js/customviews 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @customviews-js/customviews v1.1.1
2
+ * @customviews-js/customviews v1.1.2
3
3
  * (c) 2025 Chan Ger Teck
4
4
  * Released under the MIT License.
5
5
  */
@@ -2299,14 +2299,14 @@ ${TAB_STYLES}
2299
2299
  // Fallback if currentScript is not available (executed after page load)
2300
2300
  if (!scriptTag) {
2301
2301
  // Try to find the script tag by looking for our script
2302
- const scripts = document.querySelectorAll('script[src*="custom-views"]');
2302
+ const scripts = document.querySelectorAll('script[src*="@customviews-js"]');
2303
2303
  if (scripts.length > 0) {
2304
2304
  // Find the most specific match (to avoid matching other custom-views scripts)
2305
2305
  for (let i = 0; i < scripts.length; i++) {
2306
2306
  const script = scripts[i];
2307
2307
  const src = script.getAttribute('src') || '';
2308
- // Look for .min.js or .js at the end
2309
- if (src.match(/custom-views(\.min)?\.js($|\?)/)) {
2308
+ // Look for .min.js or .js at the end, or the package root
2309
+ if (src.match(/@customviews-js\/customviews(\.min)?\.js($|\?)/) || src.includes('@customviews-js/customviews')) {
2310
2310
  scriptTag = script;
2311
2311
  break;
2312
2312
  }