Adding LibreJS back after bundles refactor upstream 5.36.1-fsf-michael-attempt-0
authorMichael McMahon <michael@fsf.org>
Wed, 16 Dec 2020 21:57:12 +0000 (16:57 -0500)
committerMichael McMahon <michael@fsf.org>
Thu, 22 Apr 2021 02:36:55 +0000 (22:36 -0400)
CRM/Core/Region.php
setup/res/page.tpl.php

index c7eab5c58418638048df690882e7081b0c15fc2e..f4d86cee47ff92c6fbf5df8c123e8a04a5c23b98 100644 (file)
@@ -106,7 +106,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;
 
@@ -133,7 +133,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':