Skip to content

Commit

Permalink
A proper repo
Browse files Browse the repository at this point in the history
  • Loading branch information
darsain committed Mar 11, 2013
1 parent 0b179e9 commit d4dec83
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
psd/
screens/
tmp/
test/tmp/
npm-debug.log
51 changes: 51 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"browser": true,
"predef" : [
"chrome",
"h"
],

"bitwise": false,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": false,
"plusplus": false,
"quotmark": false,
"regexp": false,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,

"asi": false,
"boss": false,
"debug": false,
"eqnull": true,
"es5": true,
"esnext": false,
"evil": false,
"expr": false,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": true,
"loopfunc": false,
"multistr": false,
"onecase": true,
"proto": false,
"regexdash": false,
"scripturl": false,
"smarttabs": true,
"shadow": false,
"sub": false,
"supernew": false
}
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Submitting an issue

When reporting a bug, please describe it thoroughly, with a URL where it happens, and preferably attached screenshot.

## Contributions

Contributions are welcome! But please, follow these few simple rules:

**Maintain the coding style** used throughout the project, and defined in the `.editorconfig` file. You can use the
[Editorconfig](http:https://editorconfig.org) plugin for your editor of choice:

- [Sublime Text 2](https://github.com/sindresorhus/editorconfig-sublime)
- [Textmate](https://github.com/Mr0grog/editorconfig-textmate)
- [Notepad++](https://github.com/editorconfig/editorconfig-notepad-plus-plus)
- [Emacs](https://github.com/editorconfig/editorconfig-emacs)
- [Vim](https://github.com/editorconfig/editorconfig-vim)
- [Visual Studio](https://github.com/editorconfig/editorconfig-visualstudio)
- [... other editors](http:https://editorconfig.org/#download)

---

**Code has to pass JSHint** with options defined in the `.jshintrc` file. You can use `grunt jshint` task to lint
manually, or again, there are amazing plugins for a lot of popular editors consuming this file and linting as you code:

- [Sublim Text 2](https://github.com/SublimeLinter/SublimeLinter)
- [TextMate](http:https://rondevera.github.com/jslintmate/), or [alternative](http:https://fgnass.posterous.com/jslint-in-textmate)
- [Notepad++](http:https://sourceforge.net/projects/jslintnpp/)
- [Emacs](https://github.com/daleharvey/jshint-mode)
- [Vim](https://github.com/walm/jshint.vim)
- [Visual Studio](https://github.com/jamietre/SharpLinter), or [alternative](http:https://jslint4vs2010.codeplex.com/)
- [... other editors](http:https://www.jshint.com/platforms/)
68 changes: 68 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*global module */
module.exports = function(grunt) {
'use strict';

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
manifest: grunt.file.readJSON('extension/manifest.json'),

// JSHint the code.
jshint: {
options: {
jshintrc: '.jshintrc',
},
all: ['extension/js/*.js'],
},

// Clean folders.
clean: {
build: ['build/**', '!build']
},

// Bump up the version in JSON file.
bumpup: 'extension/manifest.json',

// Commit last changes and tag the commit with a version from this JSON file.
tagrelease: 'extension/manifest.json',

// Build an archive ready to be uploaded to web store.
compress: {
main: {
options: {
mode: 'zip',
level: 1,
archive: 'build/<%= pkg.name %>-<%= manifest.version %>.zip'
},
expand: true,
cwd: 'extension/',
src: ['**'],
dest: '/'
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-tagrelease');
grunt.loadNpmTasks('grunt-bumpup');

// Build task.
grunt.registerTask('build', function () {
grunt.task.run('clean');
grunt.task.run('compress');
});

// Release task.
grunt.registerTask('release', function (type) {
type = type ? type : 'patch';
grunt.task.run('jshint');
grunt.task.run('bumpup:' + type);
grunt.task.run('tagrelease');
});

// By default, lint.
grunt.registerTask('default', ['jshint']);
};
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# [Dribbble HD](https://chrome.google.com/webstore/detail/dribbble-hd/ichgbbciejbjechpkakbegaaenamkpib)

Google Chrome extension.
Google Chrome extension that displays full images while browsing [Dribbble](http:https://dribbble.com) shots.

## Submitting an issue

When reporting a bug, please describe it thoroughly, with a URL where it happens, and preferably attached screenshot.

## Contributions

Contributions are welcome! But please, read the [Contributing Guidelines](CONTRIBUTING.md).

## Release History

**1.4.1** :: *10th Mar 2013*

- Changing packaging style. Hopefully fixing the mysterious
[Issue 103281](https://code.google.com/p/chromium/issues/detail?id=103281).

**1.4.0** :: *9th Mar 2013*

- Removed jQuery to lower the footprint.
- Extension rewrite to framework-less plain JavaScript.
- Fixed styles hiding "liked by" message.

**1.3.2** :: *9th Mar 2013*

- Fix for new Dribbble styles.

**1.3.1** :: *8th Mar 2013*

- URL matching bug fix.

**1.3.0** :: *8th Mar 2013*

- Fix for new Dribble styles.
- Now runs in a lot more pages, like tags, lists, buckets, profiles, ...
- Removed "Shots per row" option - to increase maintainability, it will be now only responsive.

**1.0.0** - **1.2.5**

- Style and bug fixes.
7 changes: 3 additions & 4 deletions extension/js/background.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/*global chrome */
'use strict';

// Listen for requests
chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
'use strict';

switch (request.get) {
case 'options':
sendResponse(localStorage.options ? JSON.parse(localStorage.options) : {});
break;

default:
sendResponse({});
sendResponse(undefined);
}
});
1 change: 0 additions & 1 deletion extension/js/dribblehd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global chrome, h */
(function (undefined) {
'use strict';

Expand Down
5 changes: 2 additions & 3 deletions extension/js/options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global h */
(function (undefined) {
'use strict';

Expand All @@ -21,8 +20,8 @@
}
});

// save options on input change
h.bind(container, 'change', function (event) { console.log(event);
// Save options on change
h.bind(container, 'change', function (event) {
var element = event.target;
var name = element.name;

Expand Down
19 changes: 8 additions & 11 deletions extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
{
"name": "Dribbble HD",
"name": "DribbbleHD",
"description": "Display full images while browsing Dribbble shots.",
"version": "1.4.0",

"version": "1.4.1",
"manifest_version": 2,

"icons": {
"16": "img/icon_16.png",
"48": "img/icon_48.png",
"128": "img/icon_128.png"
},

"permissions": [
"*:https://dribbble.com/"
],

"options_page": "options.html",

"background": {
"scripts": ["js/background.js"]
"scripts": [
"js/background.js"
]
},

"content_scripts": [
{
"matches": ["*:https://dribbble.com/*"],
"matches": [
"*:https://dribbble.com/*"
],
"js": [
"js/helpers.js",
"js/dribblehd.js"
],
"run_at": "document_end"
}
],

"web_accessible_resources": [
"css/dribbblehd.css",
"img/loading.gif",
Expand Down
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "dribbblehd",
"version": "0.0.0",
"devDependencies": {
"grunt-contrib-compress": "~0.4.1",
"grunt-contrib-jshint": "~0.2.0",
"grunt-contrib-clean": "~0.4.0",
"grunt-tagrelease": "~0.2.0",
"grunt-bumpup": "~0.2.0",
"grunt": "~0.4.0"
}
}

0 comments on commit d4dec83

Please sign in to comment.