<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - Pjotor</title>
<link>http://snipplr.com/users/Pjotor/language/javascript</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 23 May 2013 16:21:53 GMT</pubDate>
<item>
<title>(JavaScript) Search string to JSON</title>
<link>http://snipplr.com/view/70905/search-string-to-json/</link>
<description><![CDATA[ <p>Since I'm doing this from time to time, I thought I'd put a snipplet here.

This function returns a JSON objectbased on document.location.search</p> ]]></description>
<pubDate>Tue, 23 Apr 2013 23:26:06 GMT</pubDate>
<guid>http://snipplr.com/view/70905/search-string-to-json/</guid>
</item>
<item>
<title>(JavaScript) Calendar object</title>
<link>http://snipplr.com/view/64617/calendar-object/</link>
<description><![CDATA[ <p>Returns a nice little calendar object with month name, week day, month, year, date, days in month, day of week and position in month from now or supplied Date.</p> ]]></description>
<pubDate>Mon, 16 Apr 2012 22:29:58 GMT</pubDate>
<guid>http://snipplr.com/view/64617/calendar-object/</guid>
</item>
<item>
<title>(JavaScript) Workhours calculator</title>
<link>http://snipplr.com/view/58460/workhours-calculator/</link>
<description><![CDATA[ <p>Usage: worktime([startHours, startMinutes],[endHours, endMinutes]);</p> ]]></description>
<pubDate>Tue, 06 Sep 2011 01:37:43 GMT</pubDate>
<guid>http://snipplr.com/view/58460/workhours-calculator/</guid>
</item>
<item>
<title>(JavaScript) Bad filtered Culture/Banks ship names</title>
<link>http://snipplr.com/view/51941/bad-filtered-culturebanks-ship-names/</link>
<description><![CDATA[ <p>Dump</p> ]]></description>
<pubDate>Mon, 11 Apr 2011 22:41:36 GMT</pubDate>
<guid>http://snipplr.com/view/51941/bad-filtered-culturebanks-ship-names/</guid>
</item>
<item>
<title>(JavaScript) CSS class/id/object style extractor</title>
<link>http://snipplr.com/view/49703/css-classidobject-style-extractor/</link>
<description><![CDATA[ <p>I needed something that could extract style from a css-class, even if no DOM-object had the class; thus this little plugin.   
   
Usage:   
$.cssStyle(".className")   
Returns a Object with key/value pairs corresponding to the style of the CSS-class "className"</p> ]]></description>
<pubDate>Sat, 26 Feb 2011 03:06:51 GMT</pubDate>
<guid>http://snipplr.com/view/49703/css-classidobject-style-extractor/</guid>
</item>
<item>
<title>(JavaScript) Query string mapper (String to Object)</title>
<link>http://snipplr.com/view/46738/query-string-mapper-string-to-object/</link>
<description><![CDATA[ <p>A simple prototype function to make objects out of url query strings.   
(bonus jQuery plugin)</p> ]]></description>
<pubDate>Sat, 08 Jan 2011 01:58:05 GMT</pubDate>
<guid>http://snipplr.com/view/46738/query-string-mapper-string-to-object/</guid>
</item>
<item>
<title>(JavaScript) jQuery vignette plugin</title>
<link>http://snipplr.com/view/42698/jquery-vignette-plugin/</link>
<description><![CDATA[ <p>Supersimple vignette plugin (req. gradients/CSS3).    
Use: $("body").vignette();    
Options:    
from color, to color, fade time, vignette container class name    
    
Bonus CSS:     
.vignette {    
  height: 100%; width:100%; position:fixed; top:0; left:0; z-index:10000;    
  background:rgba(0,0,0,.5);    
  background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 1000, from(rgba(0,0,0,.2)), to(rgba(0,0,0,.5)));    
  background:-moz-radial-gradient(50% 50%,farthest-side,rgba(0,0,0,.2),rgba(0,0,0,.5))    
}</p> ]]></description>
<pubDate>Thu, 21 Oct 2010 22:40:44 GMT</pubDate>
<guid>http://snipplr.com/view/42698/jquery-vignette-plugin/</guid>
</item>
<item>
<title>(JavaScript) Keyboard-friendly passwords</title>
<link>http://snipplr.com/view/42564/keyboardfriendly-passwords/</link>
<description><![CDATA[ <p>Generates keyboard-friendly passwords.    
Use: pwd.gen(7,1) (generate a 7 char password with 1 special character)</p> ]]></description>
<pubDate>Tue, 19 Oct 2010 22:49:05 GMT</pubDate>
<guid>http://snipplr.com/view/42564/keyboardfriendly-passwords/</guid>
</item>
<item>
<title>(JavaScript) Pnr (swe) and EAN checksum prototype</title>
<link>http://snipplr.com/view/38226/pnr-swe-and-ean-checksum-prototype/</link>
<description><![CDATA[ <p>EAN and Personnummer checksum/digit calculator.

Usage: 

"123456789".ean() ==> "1234567895"

"123456789".pnr() ==> "1234567897"

Note: This does not validate checksum/digit, only calculates it.</p> ]]></description>
<pubDate>Mon, 02 Aug 2010 20:44:57 GMT</pubDate>
<guid>http://snipplr.com/view/38226/pnr-swe-and-ean-checksum-prototype/</guid>
</item>
<item>
<title>(JavaScript) easy QR code</title>
<link>http://snipplr.com/view/36414/easy-qr-code/</link>
<description><![CDATA[ <p>This "plug in" (only a url builder really) returns the path to a QR code built by google chart api with the code of your choice and optional size (2:nd argument, 160px default).

Usage: $().qrcode("hello world") or $().qrcode("hello world",100)


Update!
Added prototype version.
Rebuilds image to a QRcode from the google charts API; 

ex. 
document.getElementById("myImage").qrcode("hello world")
makes the image with ID "myImage" to a QRcode with value "hello world"</p> ]]></description>
<pubDate>Mon, 28 Jun 2010 19:00:13 GMT</pubDate>
<guid>http://snipplr.com/view/36414/easy-qr-code/</guid>
</item>
<item>
<title>(JavaScript) Pattern replace String prototype</title>
<link>http://snipplr.com/view/33637/pattern-replace-string-prototype/</link>
<description><![CDATA[ <p>Quick and dirty pattern string replacer.
Usage:
"my {color} {fruit}".prep({ color: "red", fruit: "apple"})</p> ]]></description>
<pubDate>Fri, 30 Apr 2010 04:21:54 GMT</pubDate>
<guid>http://snipplr.com/view/33637/pattern-replace-string-prototype/</guid>
</item>
<item>
<title>(JavaScript) Hex encode &amp;amp; decode String prototype</title>
<link>http://snipplr.com/view/30964/hex-encode--decode-string-prototype/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 06 Apr 2010 07:03:56 GMT</pubDate>
<guid>http://snipplr.com/view/30964/hex-encode--decode-string-prototype/</guid>
</item>
<item>
<title>(JavaScript) Fuzzy Clock</title>
<link>http://snipplr.com/view/23974/fuzzy-clock/</link>
<description><![CDATA[ <p>A short compact fuzzy clock script.
Fuzzes a supplied date object or returns current time fuzzy.</p> ]]></description>
<pubDate>Tue, 01 Dec 2009 06:15:22 GMT</pubDate>
<guid>http://snipplr.com/view/23974/fuzzy-clock/</guid>
</item>
<item>
<title>(JavaScript) insult generator</title>
<link>http://snipplr.com/view/17118/insult-generator/</link>
<description><![CDATA[ <p>A quick hackup of the "Shakespearean" insult generator.</p> ]]></description>
<pubDate>Fri, 17 Jul 2009 10:38:11 GMT</pubDate>
<guid>http://snipplr.com/view/17118/insult-generator/</guid>
</item>
</channel>
</rss>