From df465cb1f389f3bf907fb9662345ea4c9633e606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 27 Jun 2024 10:23:14 +0200 Subject: [PATCH] Remove all polyfill.io See: https://thehackernews.com/2024/06/over-110000-websites-affected-by.html --- api/dist/apihelp/apihelp.html | 5 ----- buildtools/check-example.js | 1 - contribs/gmf/apps/desktop/index.html.ejs | 1 - contribs/gmf/apps/desktop_alt/index.html.ejs | 1 - contribs/gmf/apps/iframe_api/index.html.ejs | 1 - contribs/gmf/apps/mobile/index.html.ejs | 1 - contribs/gmf/apps/mobile_alt/index.html.ejs | 1 - contribs/gmf/apps/oeedit/index.html.ejs | 1 - contribs/gmf/src/controllers/bootstrap.js | 14 -------------- 9 files changed, 26 deletions(-) diff --git a/api/dist/apihelp/apihelp.html b/api/dist/apihelp/apihelp.html index 9398bc473b46..2a0381ffe629 100644 --- a/api/dist/apihelp/apihelp.html +++ b/api/dist/apihelp/apihelp.html @@ -39,7 +39,6 @@ } - @@ -54,10 +53,6 @@

Simple API Help

Basis

To use the API you should add the following HTML:


-<script
-  src="https://cdn.polyfill.io/v2/polyfill.min.js?features=es6,default-3.6,Array.prototype.includes,Object.entries,Object.values"
-  crossorigin="anonymous">
-</script>
 <link href="https://geomapfish-demo-2-6.camptocamp.com/api.css" rel="stylesheet">
 <script src="https://geomapfish-demo-2-6.camptocamp.com/api.js?version=2"></script>
 <script>
diff --git a/buildtools/check-example.js b/buildtools/check-example.js
index b16bb417c9e1..7d020669da32 100644
--- a/buildtools/check-example.js
+++ b/buildtools/check-example.js
@@ -227,7 +227,6 @@ function loaded(page, browser) {
     const url = request.url();
     if (
       !url.startsWith('https://www.camptocamp.com/') &&
-      !url.startsWith('https://cdn.polyfill.io/') &&
       !url.startsWith('https://maps.googleapis.com/')
     ) {
       console.log(`Request failed on: ${url}`);
diff --git a/contribs/gmf/apps/desktop/index.html.ejs b/contribs/gmf/apps/desktop/index.html.ejs
index 58860b0e99d3..a6bb0ec70ec8 100644
--- a/contribs/gmf/apps/desktop/index.html.ejs
+++ b/contribs/gmf/apps/desktop/index.html.ejs
@@ -336,7 +336,6 @@
         ngeo-resizemap-state="mainCtrl.queryGridActive">
       
     
-    
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
     
diff --git a/contribs/gmf/apps/desktop_alt/index.html.ejs b/contribs/gmf/apps/desktop_alt/index.html.ejs
index 960fbb4bf3ef..aebacd635fd5 100644
--- a/contribs/gmf/apps/desktop_alt/index.html.ejs
+++ b/contribs/gmf/apps/desktop_alt/index.html.ejs
@@ -424,7 +424,6 @@
       
       
     
-    
     
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
diff --git a/contribs/gmf/apps/iframe_api/index.html.ejs b/contribs/gmf/apps/iframe_api/index.html.ejs
index 3966cc66e060..0ff1f72aa706 100644
--- a/contribs/gmf/apps/iframe_api/index.html.ejs
+++ b/contribs/gmf/apps/iframe_api/index.html.ejs
@@ -72,7 +72,6 @@
         
       
     
-    
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
     
diff --git a/contribs/gmf/apps/mobile/index.html.ejs b/contribs/gmf/apps/mobile/index.html.ejs
index 10844f8ae78c..d9fe981345a0 100644
--- a/contribs/gmf/apps/mobile/index.html.ejs
+++ b/contribs/gmf/apps/mobile/index.html.ejs
@@ -188,7 +188,6 @@
         gmf-mobile-nav-back="mainCtrl.gmfUser.username !== null">
       
     
-    
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
     
diff --git a/contribs/gmf/apps/mobile_alt/index.html.ejs b/contribs/gmf/apps/mobile_alt/index.html.ejs
index bd0ce03653a1..43dd12843467 100644
--- a/contribs/gmf/apps/mobile_alt/index.html.ejs
+++ b/contribs/gmf/apps/mobile_alt/index.html.ejs
@@ -173,7 +173,6 @@
         gmf-mobile-nav-back="mainCtrl.gmfUser.username !== null">
       
     
-    
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
     
diff --git a/contribs/gmf/apps/oeedit/index.html.ejs b/contribs/gmf/apps/oeedit/index.html.ejs
index b4c35fc7e6e7..7c550b8e7a88 100644
--- a/contribs/gmf/apps/oeedit/index.html.ejs
+++ b/contribs/gmf/apps/oeedit/index.html.ejs
@@ -153,7 +153,6 @@
         ngeo-resizemap-state="profileChartActive">
       
     
-    
     
     <% for (var js in htmlWebpackPlugin.files.js) { %>
     
diff --git a/contribs/gmf/src/controllers/bootstrap.js b/contribs/gmf/src/controllers/bootstrap.js
index 9f8e10a70f85..870a0936adb4 100644
--- a/contribs/gmf/src/controllers/bootstrap.js
+++ b/contribs/gmf/src/controllers/bootstrap.js
@@ -28,20 +28,6 @@ import angular from 'angular';
  * @param {angular.IModule} module The module
  */
 function bootstrap(module) {
-  // Hack to make the bootstrap type check working with polyfill.io
-  const oldObjectToString = Object.prototype.toString;
-  if (!oldObjectToString.toString().includes('[native code]')) {
-    Object.prototype.toString = function () {
-      if (this === null) {
-        return '[object Null]';
-      }
-      if (this === undefined) {
-        return '[object Undefined]';
-      }
-      return oldObjectToString.call(this);
-    };
-  }
-
   const interface_ = $('meta[name=interface]')[0].getAttribute('content');
   const dynamicUrl_ = $('meta[name=dynamicUrl]')[0].getAttribute('content');
   const search = document.location ? document.location.search || '' : '';