From nobody Mon May 6 01:46:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560957824; cv=none; d=zoho.com; s=zohoarc; b=dvhxBvDgtuURfWPkIk1AMsrlYltPAt7Bc0vVYAyX4cTXCXIbj4Kl+Reaa+PLPWvKw3rD3OhHc8QaRfK6XPxfdvnL4hzMn+KIjIJRuLMUh+dApQ4/muSxG5Np8LSPXHrHcGEm3v4IiVeP5fvkwpL2TVtQFD37+3etl9sAF9HqFbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560957824; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=VUrZ16Yr7abxCmzDoPL76TasKDDl1iaBHvJoqtcFxPc=; b=chcszCfimp7BSQTVc+XVbHz+/+ZQHU8GP+ZY2GVa5ykHc2JDxw8IH73iM9XKXsiSiyWLELGRku+1qI+L0s1DFT5twi8xLNxE2kwGoDhJkuLf9iFAlDnWTk01dXf6oOYujphIFZagwpbq3oFY/DGxbautZMrDdHQt03tMvKN2814= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560957824905534.6245523124795; Wed, 19 Jun 2019 08:23:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4104E308622C; Wed, 19 Jun 2019 15:23:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F79F608CA; Wed, 19 Jun 2019 15:23:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C6CB51806B1C; Wed, 19 Jun 2019 15:23:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JFN4QY001001 for ; Wed, 19 Jun 2019 11:23:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB6F7608A7; Wed, 19 Jun 2019 15:23:04 +0000 (UTC) Received: from wheatley (ovpn-204-153.brq.redhat.com [10.40.204.153]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 76AE9608A5 for ; Wed, 19 Jun 2019 15:23:02 +0000 (UTC) Received: from wheatley.redhat.com (wheatley.usersys.redhat.com [127.0.0.1]) by wheatley (Postfix) with ESMTP id 6A95D7E0068 for ; Wed, 19 Jun 2019 17:22:59 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 17:22:57 +0200 Message-Id: <981f49588424f998538a91a5f91ce70ec1bf1145.1560957709.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/3] docs: Use our own implementation for fetching the RSS data X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 19 Jun 2019 15:23:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This is just a small script I wrote. It works the same way as all the libr= aries together which we are bundling, but with just JS. The only difference is t= hat the day of the date is formatted as 2-digit, but this should be a bug in Firefox (at least locally for me) as the documentation states that type 'numeric' should actually not have leading zeros. It will not be executed when the page is loaded locally. It also uses the same proxy that query-rss uses. We can get rid of that, b= ut we'd either need to have our own proxy, send a sss header to allow fetching= the atom.xml or providing JSONP access to the RSS feed on virt-planet. Signed-off-by: Martin Kletzander --- docs/index.html.in | 13 ------------- docs/js/main.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/docs/index.html.in b/docs/index.html.in index f593445d061d..fa75289cad0f 100644 --- a/docs/index.html.in +++ b/docs/index.html.in @@ -5,19 +5,6 @@

The virtualization API

diff --git a/docs/js/main.js b/docs/js/main.js index e57b9f47ac11..07f79c7ff903 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -29,6 +29,53 @@ function pageload() { =20 simpleSearch =3D document.getElementById("simplesearch") simplesearch.addEventListener("submit", advancedsearch) + + docLoc =3D document.location; + if (docLoc.protocol !=3D "file:" || + docLoc.origin !=3D "null" || + docLoc.host !=3D=3D "" || + docLoc.hostname !=3D=3D "") { + fetchRSS() + } +} + +function fetchRSS() { + cb =3D "jsonpRSSFeedCallback" + window["jsonpRSSFeedCallback"] =3D function (data) { + if (data.responseStatus !=3D 200) + return + entries =3D data.responseData.feed.entries + nEntries =3D Math.min(entries.length, 4) + + dl =3D document.createElement('dl') + + dateOpts =3D { day: 'numeric', month: 'short', year: 'numeric'} + + for (i =3D 0; i < nEntries; i++) { + entry =3D entries[i] + a =3D document.createElement('a') + a.href =3D entry.link + a.innerText =3D entry.title + + dt =3D document.createElement('dt') + dt.appendChild(a) + dl.appendChild(dt) + + date =3D new Date(entry.publishedDate) + datestr =3D date.toLocaleDateString('default', dateOpts) + + dd =3D document.createElement('dd') + dd.innerText =3D ` by ${entry.author} on ${datestr}` + + dl.appendChild(dd) + } + + planet.appendChild(dl); + }; + script =3D document.createElement("script") + script.src =3D "https://feedrapp.herokuapp.com/" + script.src +=3D `?q=3Dhttp%3A%2F%2Fplanet.virt-tools.org%2Fatom.xml&ca= llback=3D${cb}` + document.body.appendChild(script); } =20 function advancedsearch(e) { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 01:46:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560957824; cv=none; d=zoho.com; s=zohoarc; b=evnSGXukhWh9PHDtjggy5k8Z/J+BUJVI8/gnC0q74BXJ9ilwIOxQyN0rKsRyPfxIUA6HJQfYbD/VWlY55/io+8VcY/Xl2tOI7KSHSbB0K+zcVqkrvbLM9YQymydjSu5YW0MPHeycjcyP5oOqr85Kq5o4jp0608V08q+d6wJ/8cY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560957824; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=9IP9GzHreYt4NDbrJzXmCjgj6eJBxvAbKTME/C/Yj94=; b=M8CxNqnlJ93EZ5Y+paDVDeEbrZZULwrrg6P6XBIXHNQvshdM+Y7dluOXf/HfJK9JdINy3BKUPwaNYuocORaVadja3EAVOpouPLiCtomVsO8MwDpXOOxXN4zoXPIjWiUXcTUGXvVLs+kLMZDc23SIMiSyJ2Z4Nuuhmh0yu/D0qeg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560957824805392.1866362712108; Wed, 19 Jun 2019 08:23:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0700D81E09; Wed, 19 Jun 2019 15:23:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E08895D9C6; Wed, 19 Jun 2019 15:23:11 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C35A91806B1A; Wed, 19 Jun 2019 15:23:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JFN4Cr000990 for ; Wed, 19 Jun 2019 11:23:04 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8D28F17BB6; Wed, 19 Jun 2019 15:23:04 +0000 (UTC) Received: from wheatley (ovpn-204-153.brq.redhat.com [10.40.204.153]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 62DEC619B0 for ; Wed, 19 Jun 2019 15:23:02 +0000 (UTC) Received: from wheatley.redhat.com (wheatley.usersys.redhat.com [127.0.0.1]) by wheatley (Postfix) with ESMTP id 758DB7E006A for ; Wed, 19 Jun 2019 17:22:59 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 17:22:58 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] docs: use case sensitive javascript X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 19 Jun 2019 15:23:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander Reviewed-by: Andrea Bolognani Reviewed-by: Christophe de Dinechin --- docs/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/js/main.js b/docs/js/main.js index 07f79c7ff903..668bf752b73d 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -28,7 +28,7 @@ function pageload() { advancedSearch.className =3D "advancedsearch" =20 simpleSearch =3D document.getElementById("simplesearch") - simplesearch.addEventListener("submit", advancedsearch) + simpleSearch.addEventListener("submit", advancedsearch) =20 docLoc =3D document.location; if (docLoc.protocol !=3D "file:" || --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 01:46:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1560957869; cv=none; d=zoho.com; s=zohoarc; b=F5d3lHcqrbhyCBmGlKdkd32dQqPlrsAC8Ns0B0JkyN1C1XAKJKQBZ9vqUJp7ZgZyimtmJwkoB6xEyscOogyqDuIO4YhsOhcdkP9JpgIZrJxMFD/OX4SIm7BK9otgNm6ybpH5fmhgyrML+nbI+pbYPDeRvp29hgR3IWx4tl5q28g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560957869; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=fTDmNe7dWNoVVnD29UGZqm6Xa76ZLZAjhej5L5waq0U=; b=Sl/eQwiUMpMuMRsoWgEWxamMoYHh7fBCCaEZLtv75PvwjhZnu3Lpgqs1uSCtgZkIQcEUTKrLTFe56Tkvy5phZcyvf6ob5K0Ulbj5kbHCLcnTtfdsoR4AY1816PR7vBZCL/q32f2EHYqoV386Fy6LXxSnsSqG7qELq7hjxCIgKu8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1560957869829872.8717452696176; Wed, 19 Jun 2019 08:24:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 423BF3019882; Wed, 19 Jun 2019 15:24:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2556608A5; Wed, 19 Jun 2019 15:24:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8E648206D3; Wed, 19 Jun 2019 15:24:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5JFN6jM001009 for ; Wed, 19 Jun 2019 11:23:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id C230A1001E69; Wed, 19 Jun 2019 15:23:06 +0000 (UTC) Received: from wheatley (ovpn-204-153.brq.redhat.com [10.40.204.153]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A79701001DE7 for ; Wed, 19 Jun 2019 15:23:02 +0000 (UTC) Received: from wheatley.redhat.com (wheatley.usersys.redhat.com [127.0.0.1]) by wheatley (Postfix) with ESMTP id 772977E006B for ; Wed, 19 Jun 2019 17:22:59 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 19 Jun 2019 17:22:59 +0200 Message-Id: <53be1b68be9a3035e457fd7a46e700b9e6d11513.1560957709.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] docs: Remove unused JS libraries X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 19 Jun 2019 15:24:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- docs/Makefile.am | 6 +----- docs/index.html.in | 3 --- docs/js/jquery-3.1.1.min.js | 4 ---- docs/js/jquery.rss.min.js | 11 ----------- docs/js/moment.min.js | 7 ------- 5 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 docs/js/jquery-3.1.1.min.js delete mode 100644 docs/js/jquery.rss.min.js delete mode 100644 docs/js/moment.min.js diff --git a/docs/Makefile.am b/docs/Makefile.am index 0c899f958026..3e2cc39013f3 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -66,11 +66,7 @@ css =3D \ main.css =20 javascript =3D \ - js/main.js \ - js/jquery-3.1.1.min.js \ - js/jquery.rss.min.js \ - js/moment.min.js - + js/main.js =20 fonts =3D \ fonts/LICENSE.md \ diff --git a/docs/index.html.in b/docs/index.html.in index fa75289cad0f..a16a2e51d4be 100644 --- a/docs/index.html.in +++ b/docs/index.html.in @@ -2,9 +2,6 @@ - -