Giter Club home page Giter Club logo

my-style's Introduction

My Style

My Style is a Google Chrome extension that allows you to insert custom CSS into pages, immediately see the visual results, and have that CSS persist for future visits.

Usage

Take TechCrunch, for example. You may dislike the site's design and want to add your own touch--that is, your own style--to make it aesthetically pleasing. After installing the extension, visit TechCrunch and hit control + m in your browser. You should see a textarea to the right:

Techcrunch textarea

Insert your custom CSS and see results:

Techcrunch restyled

(Note: if you'd like this specific Techcrunch skin, it's available at styles/techcrunch.css.)

This CSS will be reinserted upon revisiting Techcrunch, thereby saving your styles. Pressing control + m once more will hide the textarea, but your contents will still be retained.

To speed up the process of styling, if you hold alt while clicking an element, a selector for that element will automatically be appended to the textarea editor. With this, you can circumvent the time it takes to inspect the element to find how to target it.

Installation

You may install My Style at the Chrome Web Store. Just click the 'Add to Chrome' button.

How it works

My Style is quite simple. It inserts a textarea into the page, looks for changes to the textarea's contents, and updates a dynamically inserted style tag appropriately. My Style employs local storage to make CSS changes persistent. It uses simple technologies for a simple result.

Improvements

Sites that clear local storage can erase My Style's custom CSS. A more persistent form of storage (e.g. the JavaScript FileSystem APIs) would be a better option to retain CSS.

Contributors

Karthik Viswanathan

Safari extension

If you use Safari, consider downloading Luke Hagan's Safari port of My Style. It can be found at lhagan/my-style.

License

(The MIT License)

Copyright (c) 2013 Karthik Viswanathan <[email protected]>

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.

my-style's People

Contributors

alireza-ahmadi avatar karthikv avatar shidhincr avatar zlatanvasovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

my-style's Issues

Readme fix

So, project is interesting, but can you fix README.md?

Not big issue, just a visual improvment. ;)

Original:

control + m

Fix:

<kbd>Ctrl</kbd> + <kbd>M</kbd>

It looks like a Ctrl + M.

Also, you don't need to type notes into ().
Example:

(Note: if you'd like this specific Techcrunch skin, it's available at styles/techcrunch.css.)

Fix:

Note: if you'd like this specific Techcrunch skin, it's available at styles/techcrunch.css.

P.S. I made issue because I don't open small pull requests. ;)

Make the ctrl-m shortcut configurable

Ctrl-M doesn't work for me because of my keyboard setup.

You can use the chrome.commands API to make shortcuts configurable like this:

screenshot 2014-07-08 13 15 51

Would be great. Cheers.

display: none issue

So, I tried one silly thing. I press Ctrl + M and typed * {diplay: none}. I thought it would just don't display the page elements, but it overrided the My Style box, and all looked like the blank paper. I went to Developer Tools > Resources. I found the myStyle key in Local Storage and deleted it. Do I need to do that always when type * {display: none}?

meta key and windows

Windows keyboards don't usually have a 'meta' key. I suppose you should consider changing the shortcut.

Missing icons

Hi there. First of all I love the aesthetic extension. Can you upload missing icons and edit manifest.json to link them? At the moment the original icon isn't present - instead there is a default M letter. Cheers.

Restrict input to the My Style pop up

When I use Ctrl-M to show the My Style pop-up, I am unable to enter text in that pop-up.

The text is entered in the web page instead.

Probably you tested this in static pages and not sites like notion.so where the whole page is interactive.

Also pasting a code snippet into the My Style pop-up doesn't work in this condition.

Crowd-sourced CSS files

Extensions like this are great if you want to be picky and apply your own styles. I think something like greasemonkey (but for CSS) would be an excellent companion to these kinds of extensions. People can vote, edit, suggest edits, etc.

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.