From 20c336398638242eda2b18c45b4ef1b793b6a67a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Jul 2025 17:55:06 +0000 Subject: [PATCH 1/2] Create Wikidata statement viewer with React, dark/light themes, and evidence display Co-authored-by: neuralsoothsayer --- statements.html | 516 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 516 insertions(+) create mode 100644 statements.html diff --git a/statements.html b/statements.html new file mode 100644 index 0000000..4fe5ffe --- /dev/null +++ b/statements.html @@ -0,0 +1,516 @@ + + + + + + Wikidata Statement Viewer + + + + +
+ + + + + + \ No newline at end of file From 7d56666f57976c0a32de04261f3856d592d65c75 Mon Sep 17 00:00:00 2001 From: Konard Date: Thu, 17 Jul 2025 01:43:51 +0530 Subject: [PATCH 2/2] Change default statement id --- statements.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/statements.html b/statements.html index 4fe5ffe..f34c84f 100644 --- a/statements.html +++ b/statements.html @@ -273,8 +273,12 @@ 'vi': '🇻🇳' }; + // const DEFAULT_STATEMENT_ID = 'Q35120$E671D173-25F4-4D13-BF2E-A5E60B9F18A8'; + // Q35120\$1A2B3C4D-5E6F-7A8B-9C0D-EF1234567890 + const DEFAULT_STATEMENT_ID = 'Q35120$1A2B3C4D-5E6F-7A8B-9C0D-EF1234567890'; + function StatementPage() { - const [statementId, setStatementId] = React.useState(window.location.hash.slice(1) || 'Q35120$E671D173-25F4-4D13-BF2E-A5E60B9F18A8'); + const [statementId, setStatementId] = React.useState(window.location.hash.slice(1) || DEFAULT_STATEMENT_ID); const [statement, setStatement] = React.useState(null); const [confirmations, setConfirmations] = React.useState([]); const [refutations, setRefutations] = React.useState([]); @@ -295,7 +299,7 @@ React.useEffect(() => { const handleHashChange = () => { - setStatementId(window.location.hash.slice(1) || 'Q35120$E671D173-25F4-4D13-BF2E-A5E60B9F18A8'); + setStatementId(window.location.hash.slice(1) || DEFAULT_STATEMENT_ID); setIsLoading(true); }; window.addEventListener('hashchange', handleHashChange);