Coder Social home page Coder Social logo

tikenov / prayer-times-menubar-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from b0bdn/prayer-times-menubar-app

0.0 1.0 0.0 82 KB

A menubar application for displaying the prayer times from your city.

License: MIT License

HTML 19.21% JavaScript 67.31% CSS 13.48%

prayer-times-menubar-app's Introduction

JavaScript Style Guide

prayer-times-menubar-app

A menubar application for displaying the prayer times from your city.

Features

  • Actual times from any location
  • Change the calculation method or custom the angles for Fajr and Isha prayers
  • Create your own method by changing the times of the different prayers
  • Show additional times like Imsak, Sunrise and Midnight

This application use the RESTful Prayer TImes API from Aladhan.

Geolocation

You can enter your location in the settings panel, just enter: CITY, COUNTRY.
You can use the full name of the country or just the alpha-2 code ISO 3166.
When using the geolocation button, a request is made to IPinfo.io API to be able to get the city and country of you location. An internet connection is required.

This app use the Free plan from ipinfo.io, and can access up to 50k request/month.

Keyboard shortcut

You can use the following shortcuts:
Ctrl or Cmd + Alt + P Global shortcut to show/hide the app

Development

main.js

function geolocation () {
  console.log('Fetch geolocation via IPinfo.io.')
  // NOTE: Enter your TOKEN from IPinfo.io
  const TOKEN = config.TOKEN

  fetch(`https://ipinfo.io/json?token=${TOKEN}`)
    .then(res => res.json())
    .then(json => {
      // console.log(json.ip, json.city, json.country)
      store.setCityCountry(json.city, json.country)
    })
    .catch(err => console.log(err))
}
  • node-fetch v2.x is used because the ES Modules is not in use in this app.

Contributing

Contributions are welcomed !

Translations

  • English

Credit | Dependencies

Licence

MIT

prayer-times-menubar-app's People

Contributors

b0bdn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.