Adding LibreJS back after bundles refactor upstream
authorMichael McMahon <michael@fsf.org>
Wed, 16 Dec 2020 21:57:12 +0000 (16:57 -0500)
committerRuben Rodriguez <ruben@trisquel.org>
Mon, 5 Jun 2023 20:53:22 +0000 (16:53 -0400)
CRM/Core/Region.php
setup/res/page.tpl.php

index 4d9f733068c67003c28ad68cd6345be2b37c3d3e..82b93889e57c8e5a02ddbb6e7e1ef815e28dfa50 100644 (file)
@@ -108,7 +108,7 @@ class CRM_Core_Region implements CRM_Core_Resources_CollectionInterface, CRM_Cor
 
         case 'script':
           if (!$allowCmsOverride || !$cms->addScript($snippet['script'], $this->_name)) {
-            $html .= sprintf("<script type=\"text/javascript\">\n%s\n</script>\n", $snippet['script']);
+            $html .= sprintf("<script type=\"text/javascript\">\n// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3\n%s\n// @license-end\n</script>\n", $snippet['script']);
           }
           break;
 
@@ -135,7 +135,7 @@ class CRM_Core_Region implements CRM_Core_Resources_CollectionInterface, CRM_Cor
           $js = "(function(vars) {
             if (window.CRM) CRM.$.extend(true, CRM, vars); else window.CRM = vars;
             })($settingsData)";
-          $html .= sprintf("<script type=\"text/javascript\">\n%s\n</script>\n", $js);
+          $html .= sprintf("<script type=\"text/javascript\">\n// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3\n%s\n// @license-end\n</script>\n", $js);
           break;
 
         default:
index 3b3281cf6700297477735aeec277917e6a74366e..42beaf0410998328e9b9a65e456773874da8e0fc 100644 (file)
@@ -10,7 +10,7 @@
         break;
 
       case 'script-code':
-        printf("<script type=\"text/javascript\">\n%s\n</script>", $pageAsset['code']);
+        printf("<script type=\"text/javascript\">\n// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3\n%s\n// @license-end\n</script>", $pageAsset['code']);
         break;
 
       case 'style-url':