Re: [PATCH 1/3] docs: Use our own implementation for fetching the RSS data

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

 



On Wed, 2019-06-19 at 17:22 +0200, Martin Kletzander wrote:
[...]
> +    docLoc = document.location;
> +    if (docLoc.protocol != "file:" ||
> +        docLoc.origin != "null" ||
> +        docLoc.host !== "" ||
> +        docLoc.hostname !== "") {
> +        fetchRSS()
> +    }

This probably doesn't need to be this complicated, just the check
against .protocol is probably okay. If we need more flexibility we
can just add it later.

[...]
> +function fetchRSS() {
> +    cb = "jsonpRSSFeedCallback"
> +    window["jsonpRSSFeedCallback"] = function (data) {

You should be reusing cb here :)

[...]
> +        dateOpts = { day: 'numeric', month: 'short', year: 'numeric'}

You're using both single and double quotes... Please stick with a
single style, more specifically the latter which is already used
consistently throughout the file.

[...]
> +    script.src = "https://feedrapp.herokuapp.com/";
> +    script.src += `?q=http%3A%2F%2Fplanet.virt-tools.org%2Fatom.xml&callback=${cb}`

You didn't turn this into a clear URL :) That's alright, if it can
be done at all you might very well fix it up later.


With the above addressed,

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux