From: Marc Foley Date: Thu, 15 Aug 2024 12:33:07 +0000 (+0100) Subject: tags.html: add Open PR button X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8029%2Fhead;p=thirdparty%2Fgoogle%2Ffonts.git tags.html: add Open PR button --- diff --git a/.ci/tags.html b/.ci/tags.html index 424f0236f1..d9d6113ee5 100644 --- a/.ci/tags.html +++ b/.ci/tags.html @@ -13,8 +13,6 @@

Google Fonts Tagger

-

When you're done editing, please save the csv and open a pull request in the Google Fonts repo that replaces the families.csv file.

-
@@ -36,6 +34,7 @@
+
Edited
@@ -135,6 +134,19 @@ document.body.removeChild(a); URL.revokeObjectURL(url); }, + prCSV() { + this.Families = this.Families.filter((t) => t.Family !== ""); + console.log(this.Families); + let csv = Papa.unparse(this.Families, + { + columns: ["Family", "Group/Tag", "Weight"], + skipEmptyLines: true, + } + ); + alert("Tag data copied to clipboard. A github pull request page will open in a new tab. Please remove the old data and paste in the new."); + navigator.clipboard.writeText(csv); + window.open("https://github.com/google/fonts/edit/main/tags/all/families.csv") + }, loadCSV() { const csvFilePath = 'https://raw.githubusercontent.com/google/fonts/main/tags/all/families.csv'; // Update this path to your CSV file fetch(csvFilePath)