Code Monkey home page Code Monkey logo

hn-special's Introduction

HN Special — A Hacker News extension

A theme and extension for Hacker News that improves the look and feel and adds some interesting features.

The available features can be enabled or disabled based on your personal preference. New feature contributions are welcome!

You can install this extension from the Chrome Web Store.

Planned features

  • A modern looking visual theme DONE
  • Infinite scrolling DONE
  • Open links in new tab DONE
  • More accurate domain names DONE
  • Hide articles with certain keywords (maybe)
  • Mark all as read (maybe)

Contributing

The CSS is built using Stylus. If you'd like to contribute, you should first install Node, and then get stylus:

npm install -g stylus

You can then tell Stylus to watch the changes to the .styl file and compile automatically:

stylus -c -w hn_theme.styl

A note about the CSS

Some of the selectors in the CSS are very contrived. I found it was the only way to select what I wanted in a document made of tables within tables with barely any classes. I tried to use class selectors wherever I could, but it's mostly unavoidable to go down a long chain of selectors. If you spot any ways to improve any of the selectors, please make a pull request and I'll be glad to take it in!

Adding a module

If you want to add a new module, please edit defaults.json and add a descriptive key for your module (it will be used as the actual module name in the settings panel). Please keep it disabled by default if it's a change that could overwhelm some users. When the first new module will be published, some code will be added to notify users about the update through the settings menu.

For the actual code, make a JavaScript file with the same name as the module, and subscribe to the settings object through the module's key (take a look at open_links_in_new_tabs.js for an example). If the setting is enabled from the interface, your module's code will be executed. NOTE: don't forget to add your JS file to manifest.json and uninstall/reinstall the extension before you begin developing. Simply reloading it won't work.

License

HN Special is licensed under the MIT License:

The MIT License (MIT)

Copyright (c) 2013 Gabriele Cirulli

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

hn-special's People

Contributors

gabrielecirulli avatar

Watchers

James Cloos avatar Bekir Özyurt 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.