[Intel-gfx] [maintainer-tools PATCH 6/5] doc: load WaveDrom scripts directly from CDN instead of bundling
Jani Nikula
jani.nikula at intel.com
Thu Aug 10 06:43:23 UTC 2017
On Thu, 10 Aug 2017, Rodrigo Vivi <rodrigo.vivi at gmail.com> wrote:
> On Wed, Aug 9, 2017 at 2:33 PM, Jani Nikula <jani.nikula at intel.com> 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 at intel.com>
>> ---
>> 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?
I just copy-pasted the CDN link from [1], but diffing them confirms
they're the same.
BR,
Jani.
[1] https://github.com/drom/wavedrom#html-pages
>
>> + <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 at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list