Archive

Posts Tagged ‘Javascript’

Javascript API Credentials – Just a port

July 17th, 2014 No comments

There is not much to write than to attribute the logic up to a post on online code generator. Well since this was written in php and I needed the same in javascript, there was some cutting corners, and finally the script which is attached came up.

randomstring

 

The vars defined hold the two array of strings, and the function generates the key. Calling the function with genKey(16, access_salt) will generate a 16 char random string from the defined array access_salt.

Random String JS (1189)

JSON feed for WordPress

November 2nd, 2009 No comments

Pretty simple, really. Adds a new type of feed you can subscribe to. Simply add ?feed=json to anywhere you get a normal feed to get it in JSON form (but with a cutdown version of events).

Version 1.1 added support for JSONP. To get a JSONP response instead of a normal JSON structure, simply add jsonp=callbackName to your query, where callbackName is the name of the function to be wrapped with.

Author: Chris Northwood
Download: WordPress Plugin Repository