@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.
package/README.md CHANGED
@@ -12,7 +12,7 @@ With Custom Views, you can:
12
12
 
13
13
  Whether you are building a static site, a dashboard, or a documentation portal, Custom Views gives you the tools to make your content interactive and adaptable while keeping things lightweight and simple.
14
14
 
15
- [:fa-brands-github: GitHub Link  :fa-solid-arrow-up-right-from-square:](https://github.com/customviews-js/customviews)
15
+ [Documentation and User Guide](https://customviews-js.github.io/customviews)
16
16
 
17
17
  ## Components
18
18
 
@@ -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
  */
@@ -2295,14 +2295,14 @@ function initializeFromScript() {
2295
2295
  // Fallback if currentScript is not available (executed after page load)
2296
2296
  if (!scriptTag) {
2297
2297
  // Try to find the script tag by looking for our script
2298
- const scripts = document.querySelectorAll('script[src*="custom-views"]');
2298
+ const scripts = document.querySelectorAll('script[src*="@customviews-js"]');
2299
2299
  if (scripts.length > 0) {
2300
2300
  // Find the most specific match (to avoid matching other custom-views scripts)
2301
2301
  for (let i = 0; i < scripts.length; i++) {
2302
2302
  const script = scripts[i];
2303
2303
  const src = script.getAttribute('src') || '';
2304
- // Look for .min.js or .js at the end
2305
- if (src.match(/custom-views(\.min)?\.js($|\?)/)) {
2304
+ // Look for .min.js or .js at the end, or the package root
2305
+ if (src.match(/@customviews-js\/customviews(\.min)?\.js($|\?)/) || src.includes('@customviews-js/customviews')) {
2306
2306
  scriptTag = script;
2307
2307
  break;
2308
2308
  }