Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
commit fcf79d49829a483204bc19658c7aeba098baae03 1 parent fc21a6c
Gun.io Whitespace Robot authored
Showing with 59 additions and 9 deletions.
  1. +50 −0 .gitignore
  2. +6 −6 Blocky.coffee
  3. +1 −1  README
  4. +2 −2 sample.html
View
50 .gitignore
@@ -0,0 +1,50 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Numerous always-ignore extensions
+###################
+*.diff
+*.err
+*.orig
+*.log
+*.rej
+*.swo
+*.swp
+*.vi
+*~
+
+*.sass-cache
+# Folders to ignore
+###################
+.hg
+.svn
+.CVS
+# OS or Editor folders
+###################
+.DS_Store
+Icon?
+Thumbs.db
+ehthumbs.db
+nbproject
+.cache
+.project
+.settings
+.tmproj
+*.esproj
+*.sublime-project
+*.sublime-workspace
+# Dreamweaver added files
+###################
+_notes
+dwsync.xml
+# Komodo
+###################
+*.komodoproject
+.komodotools
View
12 Blocky.coffee
@@ -1,4 +1,4 @@
-window.Blocky = class Blocky
+window.Blocky = class Blocky
constructor: (text = null ,container=null, config={}) ->
if container
@container=window.document.getElementById(container)
@@ -12,10 +12,10 @@ window.Blocky = class Blocky
@black = config.black or "rgb(0,0,0)"
@white = config.white or "rgb(255,255,255)"
#type and error level control how much information we can encode.
- @type_number = config.typenumber or 10
+ @type_number = config.typenumber or 10
@error_level = config.error_level or 'M'
#in case they put something stupid
- @error_level.charAt(0).toUpperCase in ['M', 'H', 'Q' ,'L'] or 'M'
+ @error_level.charAt(0).toUpperCase in ['M', 'H', 'Q' ,'L'] or 'M'
#some fun preset colors! :D
if config.scheme in ['watermelon' , 'wedding' , 'arctic' , 'spicy']
switch config.scheme
@@ -34,7 +34,7 @@ window.Blocky = class Blocky
return
@context = canvas.getContext '2d'
-
+
@das_code = new qrcode @type_number ,'L'
@das_code.addData text
@das_code.make()
@@ -44,7 +44,7 @@ window.Blocky = class Blocky
canvas.setAttribute 'height' , canvas_size
@container.appendChild canvas
- #big main loops to build the QR code
+ #big main loops to build the QR code
limit= @das_code.getModuleCount()
if canvas.getContext
@@ -56,6 +56,6 @@ window.Blocky = class Blocky
else
@context.fillStyle = @white
@context.fillRect c*@cell_size , r*@cell_size , @cell_size, @cell_size
-
+
else
console.log "no getContext.., cannot proceed."
View
2  README
@@ -15,7 +15,7 @@ Dependencies:
The JS library after the 11/5/2011 update is included within this project.
Installation:
- The compiled javascript is included from the associated .coffee file.
+ The compiled javascript is included from the associated .coffee file.
Include this in your page after qrcode.js (Kazuhiko's library)
Usage:
View
4 sample.html
@@ -1,6 +1,6 @@
<html>
<head>
-
+
<script type="text/javascript" src="qrcode.js"></script>
<script type="text/javascript" src="Blocky.js"></script>
</head>
@@ -12,5 +12,5 @@
new Blocky('http://hackazach.net' ,'funfun', {cell_size:11, scheme:'watermelon'})
</script>
-
+
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.