From 450512cf803a2d0e51512894c3b73b07e776024c Mon Sep 17 00:00:00 2001 From: kapypara Date: Sat, 16 Dec 2023 17:40:47 +0300 Subject: [PATCH] Added a README --- README.md | 27 +++++++++++++++++++++++++++ script.js | 0 static/index.js | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) delete mode 100644 script.js diff --git a/README.md b/README.md index e69de29..ee3039c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,27 @@ +# CloneWars + +CloneWars is a JavaScript project that utilizes the HackerNews API to display the latest posts, jobs, and polls. The project aims to provide a straightforward way to access and explore the most recent content from HackerNews. + +## Getting Started + +To explore CloneWars, follow these simple steps: + +1. Clone or download the project to your local machine. + + ```bash + git clone https://learn.reboot01.com/git/ahelal/clonernews + ``` + +2. Open the `index.html` file in your preferred browser. + +you should be able to view the latest top posts in chronological order directly in your browser. + +## Testing + +To ensure that CloneWars is functioning as expected, consider checking out the following queries: + +- Job Post: [?id=38663636](index.html?id=38663636) +- Poll Post: [?id=30055031](index.html?id=30055031) +- Story Post [?id=38659529](index.html?id=38659529) + +Feel free to click on these links and navigate through the project to ensure a seamless experience. \ No newline at end of file diff --git a/script.js b/script.js deleted file mode 100644 index e69de29..0000000 diff --git a/static/index.js b/static/index.js index c1cc62a..8fcf4b7 100644 --- a/static/index.js +++ b/static/index.js @@ -149,7 +149,7 @@ function makeItemListing(itemObj) { ` const item = document.createElement('a') - item.href = (itemObj.type != itemType.job) ? "index.html?id=" + id : url + item.href = "index.html?id=" + id item.time = time item.innerHTML = element_string