Re: [maintainer-tools PATCH 6/5] doc: load WaveDrom scripts directly from CDN instead of bundling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 9, 2017 at 2:33 PM, Jani Nikula <jani.nikula@xxxxxxxxx> wrote:
> Way back when the WaveDrom stuff was added, the scripts could only be
> accessed over http. This caused issues with sites served over https and
> modern browsers rightly complaining about mixed content. This was worked
> around by downloading the WaveDrom scripts over http at build time, and
> bundling them inline into the http.
>
> Now that WaveDrom is available over https, simplify the hackery, and let
> the user's browser load the scripts directly at page load time.
>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  drm-intel-timeline.rst | 20 +++-----------------
>  drm-misc-timeline.rst  | 21 +++------------------
>  2 files changed, 6 insertions(+), 35 deletions(-)
>
> diff --git a/drm-intel-timeline.rst b/drm-intel-timeline.rst
> index 3ab39afd5788..fe69fd374cf6 100644
> --- a/drm-intel-timeline.rst
> +++ b/drm-intel-timeline.rst
> @@ -1,22 +1,8 @@
>  .. raw:: html
>
> -       <script type="text/javascript">
> -       /* Embedded WaveDrom skin from http://wavedrom.com/skins/default.js */
> -
> -.. raw:: html
> -       :url: http://wavedrom.com/skins/default.js
> -
> -.. raw:: html
> -
> -       </script>
> -       <script type="text/javascript">
> -       /* Embedded WaveDrom engine from http://wavedrom.com/WaveDrom.js */
> -
> -.. raw:: html
> -       :url: http://wavedrom.com/WaveDrom.js
> -
> -.. raw:: html
> -
> +       <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/skins/default.js"; type="text/javascript"></script>
> +       <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/wavedrom.min.js"; type="text/javascript"></script>

is wavedrom.min.js same as wavedrom.js?

> +       <script>
>         function init() {
>                 WaveDrom.ProcessAll();
>         }
> diff --git a/drm-misc-timeline.rst b/drm-misc-timeline.rst
> index a9a80d6a4cfb..76eb780ebd0a 100644
> --- a/drm-misc-timeline.rst
> +++ b/drm-misc-timeline.rst
> @@ -1,27 +1,13 @@
>  .. raw:: html
>
> -       <script type="text/javascript">
> -       /* Embedded WaveDrom skin from http://wavedrom.com/skins/default.js */
> -
> -.. raw:: html
> -       :url: http://wavedrom.com/skins/default.js
> -
> -.. raw:: html
> -
> +       <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/skins/default.js"; type="text/javascript"></script>
> +       <script src="https://cdnjs.cloudflare.com/ajax/libs/wavedrom/1.4.1/wavedrom.min.js"; type="text/javascript"></script>
> +       <script>
>         function init() {
>                 WaveDrom.ProcessAll();
>         }
>         window.onload = init;
>         </script>
> -       <script type="text/javascript">
> -       /* Embedded WaveDrom engine from http://wavedrom.com/WaveDrom.js */
> -
> -.. raw:: html
> -       :url: http://wavedrom.com/WaveDrom.js
> -
> -.. raw:: html
> -
> -       </script>
>         <script type="WaveDrom">
>
>  .. raw:: html
> @@ -30,4 +16,3 @@
>  .. raw:: html
>
>         </script>
> -
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux