Help us understand the problem. What is going on with this article?

爆速でアイデアをパクる!1時間でハッカソン横断検索ツールできたよ

More than 1 year has passed since last update.

TL;DR

世界中のハッカソンのプロジェクトを横断検索できるよ!
http://hackathons.hiroga.cc.s3-website-us-east-1.amazonaws.com/

種明かし

実はサーバー側の処理は全くありません。
Googleの site: 検索クエリを自動生成してくれるだけの簡単なサイトです。

ソースコード抜粋

(リポジトリ: https://github.com/hiroga-cc/hackathons)

const URLS = [
  "https://www.hackster.io/projects",
  "https://hackdash.org/projects",
  "https://devpost.com/software",
  "spaceappschallenge.org/project",
  "http://www.hackathon.io/projects",
  "https://protopedia.net/prototype"
];

const search_projects = function() {
  const head = "https://www.google.com/search";

  const keywords = $("#keywords")
    .val()
    .split(" ")
    .reduce((word, words) => words + "+" + word);

  const sites = URLS.map(url => "site:" + url)
    .map(url => encodeURIComponent(url))
    .reduce((site, current_sites) => current_sites + "+OR+" + site);

  const url = head + "?q=" + keywords + "+" + sites;
  console.log(url);
  // こうなります。
  // https://www.google.com/search?q=health+food+site%3Ahttps%3A%2F%2Fprotopedia.net%2Fprototype+OR+site%3Ahttp%3A%2F%2Fwww.hackathon.io%2Fprojects+OR+site%3Aspaceappschallenge.org%2Fproject+OR+site%3Ahttps%3A%2F%2Fdevpost.com%2Fsoftware+OR+site%3Ahttps%3A%2F%2Fhackdash.org%2Fprojects+OR+site%3Ahttps%3A%2F%2Fwww.hackster.io%2Fprojects
  window.open(url);
};

あとがき

他にもハッカソンのプロジェクトまとめサイトあったら教えてくださいね〜!

justincase
テクノロジーで保険を身近にする保険スタートアップです。
https://justincase.jp
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away