Skip to content
Browse files

Added compressed version, added basic cli.

  • Loading branch information...
1 parent 8f6dc2a commit f2651bdc6ed30635ac4b307543b5ded75572d8ec @balupton committed Jan 21, 2011
View
1 .gitignore
@@ -0,0 +1 @@
+.build
View
8 README.md
@@ -5,12 +5,12 @@ This project is the successor of jQuery History, it aims to:
- Support HTML5's State Management
- Provide a backwards compatible experience for Browsers which do not support HTML5's State Management
-- Provide a backwards campatible experience for Browsers which do not support HTML4's OnHashChange
+- Provide a backwards compatible experience for Browsers which do not support HTML4's OnHashChange
- Follow the original API's as much as possible
- Support for traditional anchors *- yet to complete*
- Support as many javascript frameworks as possible via adapters.
-Licensed under the New BSD License, Copyright 2011 Benjamin Arthur Lupton
+Licensed under the New BSD License, Copyright 2011 Benjamin Arthur Lupton <contact@balupton.com>
## Usage
@@ -36,6 +36,10 @@ Licensed under the New BSD License, Copyright 2011 Benjamin Arthur Lupton
})(window);
+## Explanation
+
+We create the new namespace `window.History` instead of extending the exiting namespace `window.history` (capitalisation), as each framework handles the events a little bit so we cannot guarantee full compatibility with the original spec. This is shown in the above code by using `History.getState().data` instead of `event.state`, which is actually more powerful as we have access to that state's title and url as well. As such, extending the inbuilt `window.history` would cause discrepancies.
+
## Adapters
### Supported
View
322 cli
@@ -0,0 +1,322 @@
+#!/usr/bin/env ruby
+
+# == Name
+# cli - BalCMS Command Line Interface
+#
+# == Synopsis
+# cli check-env
+# cli birth
+# cli init-commit
+# cli init-new
+# cli init-existing
+# cli configure
+# cli install
+# cli permissions
+# cli setup
+# cli cron
+#
+# cli add
+# cli stable
+# cli master
+# cli upgrade
+# cli update
+# cli deploy
+#
+# cli clean
+# cli clean-media
+# cli clean-config
+# cli clean-styles
+# cli clean-scripts
+#
+# cli [options]
+#
+# == Examples
+# cli check-env
+# Checks to see that our environment is properly configured and will support a BalCMS installation.
+#
+# cli birth
+# Executes: init-new, configure, install, init-commit
+#
+# cli init-commit
+# Performs the initial commit (commits new and modified files during the installation to the git repo).
+#
+# cli init-new
+# Initialises the repository as a new installation. Only run this once.
+#
+# TODO: finish this example section
+#
+# == Options
+# -h, --help Displays help message
+# -v, --version Display the version, then exit
+# -q, --quiet Output as little as possible, overrides verbose
+# -V, --verbose Verbose output
+#
+# == Author
+# Benjamin Arthur Lupton
+#
+# == Copyright
+# Copyright (c) 2008-2011 Benjamin Arthur Lupton.
+# Licensed under the University of Illinois/NCSA Open Source License
+# http://www.opensource.org/licenses/UoI-NCSA.php
+
+require 'optparse'
+require 'rdoc/usage'
+require 'ostruct'
+require 'date'
+
+class App
+ SOURCEMAP = './scripts/closure.map'
+ BUILDDIR = './.build'
+ CLOSUREURL = 'http://closure-compiler.googlecode.com/files/compiler-latest.zip'
+ CLOSUREDIR = './.build/closure'
+ CLOSUREZIP = './.build/closure/compiler.zip'
+ CLOSUREFILE = './.build/closure/compiler.jar'
+ YUIURL = 'http://yuilibrary.com/downloads/yuicompressor/yuicompressor-2.4.2.zip'
+ YUIDIR = './.build/yui'
+ YUIZIP = './.build/yui/compiler.zip'
+ YUIFILE = './.build/yui/yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar'
+
+ def initialize
+ init_env
+ end
+
+ def init_env
+ # Check for Requirements
+ reqs = ['mkdir','curl','tar','git']
+ reqs.each do |req|
+ has_req = `which #{req}`.strip
+ if has_req.empty?
+ abort("CLI requires the following binary which is not installed: #{req}")
+ end
+ end
+
+ # Check for Closure Compiler
+ if !File.exists?(CLOSUREFILE)
+ `mkdir -p #{CLOSUREDIR}`
+ puts "Downloading the Closure Compiler..."
+ download(CLOSUREURL, CLOSUREZIP)
+ extract(CLOSUREDIR, CLOSUREZIP)
+ end
+
+ # Check for YUI Compiler
+ if !File.exists?(YUIFILE)
+ `mkdir -p #{YUIDIR}`
+ puts "Downloading the YUI Compiler..."
+ download(YUIURL, (YUIZIP))
+ extract(YUIDIR, YUIZIP)
+ end
+ end
+
+ def has_changes
+ result = `git status`
+ if result.include? 'Changed but not updated'
+ abort("You have un-committed changes that need to be committed before we can proceed.\n#{result}")
+ end
+ end
+
+ # ===========================================================================
+ # Helpers
+
+ def download ( url, file )
+ result = `curl -L #{url} -o #{file}`
+ end
+
+ def extract ( dir, file )
+ file = file.gsub(dir,'.')
+ result = `cd #{dir} ; tar -xf #{file} ; rm -Rf #{file}`
+ end
+
+ def compressFileClosure ( in_file, out_file )
+ puts "Compressing the file [#{in_file}] to [#{out_file}]..."
+ result = `java -jar #{CLOSUREFILE} --js_output_file=#{out_file} --js=#{in_file}`
+ end
+
+ # ===========================================================================
+ # Installers
+
+ def build
+ # Prepare Compressed Directory
+ `rm -Rf scripts/compressed/*`
+
+ # Fetch Files
+ Dir.foreach('scripts/uncompressed') do |file|
+ if file[0,1] == '.'
+ next
+ end
+ in_file = 'scripts/uncompressed/'.concat(file)
+ out_file = 'scripts/compressed/'.concat(file.gsub(/\.js$/, '.min.js'))
+ compressFileClosure(in_file,out_file)
+ end
+
+ end
+
+ # ===========================================================================
+ # Git Helpers
+
+ def add
+ puts \
+ ` git add -u;`
+ end
+
+ def stable
+ puts \
+ ` git checkout #{BRANCH_STABLE};`
+ end
+
+ def dev
+ puts \
+ ` git checkout #{BRANCH_DEV};`
+ end
+
+ def master
+ puts \
+ ` git checkout master;`
+ end
+
+ def upgrade
+ puts \
+ ` git checkout #{BRANCH_BALCMS};
+ git pull balcms #{BRANCH_STABLE};
+ git checkout #{BRANCH_DEV};
+ git merge #{BRANCH_BALCMS};`
+ end
+
+ def update
+ puts \
+ ` git pull;`
+ configure
+ end
+
+ def deploy
+ puts \
+ ` git checkout #{BRANCH_STABLE};
+ git merge #{BRANCH_DEV};
+ git checkout #{BRANCH_MASTER};
+ git merge #{BRANCH_STABLE};
+ git checkout #{BRANCH_DEV};
+ git push origin --all;`
+ end
+
+end
+
+# ===========================================================================
+# Booter
+
+class Booter
+ VERSION = :'0.0.1'
+
+ attr_reader :options
+
+ def initialize(arguments, stdin)
+ @arguments = arguments
+ @stdin = stdin
+
+ # Set defaults
+ @options = OpenStruct.new
+ @options.verbose = false
+ @options.quiet = false
+ # TO DO - add additional defaults
+ end
+
+ # Parse options, check arguments, then process the command
+ def run
+
+ if parsed_options? && arguments_valid?
+
+ puts "Start at #{DateTime.now}\n\n" if @options.verbose
+
+ output_options if @options.verbose # [Optional]
+
+ process_arguments
+ process_command
+
+ puts "\nFinished at #{DateTime.now}" if @options.verbose
+
+ else
+ output_usage
+ end
+
+ end
+
+ protected
+
+ def parsed_options?
+
+ # Specify options
+ opts = OptionParser.new
+ opts.on('-v', '--version') { output_version ; exit 0 }
+ opts.on('-h', '--help') { output_help }
+ opts.on('-V', '--verbose') { @options.verbose = true }
+ opts.on('-q', '--quiet') { @options.quiet = true }
+ # TO DO - add additional options
+
+ opts.parse!(@arguments) rescue return false
+
+ process_options
+ true
+ end
+
+ # Performs post-parse processing on options
+ def process_options
+ @options.verbose = false if @options.quiet
+ end
+
+ def output_options
+ puts :"Options:\n"
+
+ @options.marshal_dump.each do |name, val|
+ puts " #{name} = #{val}"
+ end
+ end
+
+ # True if required arguments were provided
+ def arguments_valid?
+ # TO DO - implement your real logic here
+ true if @arguments.length == 1
+ end
+
+ # Setup the arguments
+ def process_arguments
+ # TO DO - place in local vars, etc
+ end
+
+ def output_help
+ output_version
+ RDoc::usage() #exits app
+ end
+
+ def output_usage
+ RDoc::usage(:'usage') # gets usage from comments above
+ end
+
+ def output_version
+ puts "#{File.basename(__FILE__)} version #{VERSION}"
+ end
+
+ def process_command
+ # Create Application
+ app = App.new
+
+ # Fetch + Execute
+ command = @arguments[0].gsub('-','_')
+ unless app.respond_to?(command)
+ abort("Unknown command: #{command}")
+ end
+ app.send(command)
+ end
+
+ def process_standard_input
+ input = @stdin.read
+ # TO DO - process input
+
+ # [Optional]
+ #@stdin.each do |line|
+ # # TO DO - process each line
+ #end
+ end
+end
+
+
+# Create Booter
+booter = Booter.new(ARGV, STDIN)
+booter.run
View
2 scripts/compressed/history.adapter.dojo.min.js
@@ -0,0 +1,2 @@
+(function(g,e){var d=e.History||{};if(typeof d.Adapter!=="undefined")throw Error("History.js Adapter has already been emulated...");d.Adapter={getBrowserFlag:function(){var a=["msie","mozilla","webkit","webkit","opera"],b=null;["ie","firefox","safari","chrome","opera"].each(function(c,f){if(Browser[f]){b=a[c];return false}});return b},getBrowserMajorVersion:function(){var a=null;switch(true){case Browser.ie6:a=6;break;case Browser.ie7:a=7;break;case Browser.ie8:a=8;break;case Browser.ie:a=9;break;
+case Browser.firefox2:a=2;break;case Browser.firefox3:a=3;break;case Browser.firefox:a=4;break;case Browser.safari3:a=3;break;case Browser.safari4:a=4;break;case Browser.safari:a=5;break;case Browser.chrome:a=8;break;case Browser.opera:a=10}return a},bind:function(a,b,c){return(typeof a==="string"?document.id(a):a).addEvent(b,c)},trigger:function(a,b,c){return(typeof a==="string"?dojo.byId(a):a).fireEvent(b,c||{})}};typeof d.init!=="undefined"&&d.init()})(dojo,window);
View
1 scripts/compressed/history.adapter.jquery.min.js
@@ -0,0 +1 @@
+(function(c,f){var d=f.History||{};if(typeof d.Adapter!=="undefined")throw Error("History.js Adapter has already been emulated...");d.Adapter={getBrowserFlag:function(){var a=null;c.each(["msie","webkit","mozilla","opera"],function(e,b){if(c.browser[b]){a=b;return false}});return a},getBrowserMajorVersion:function(){return parseInt(c.browser.version,10)},bind:function(a,e,b){return c(a).bind(e,b)},trigger:function(a,e,b){return c(a).trigger(e,b)}};typeof d.init!=="undefined"&&d.init()})(jQuery,window);
View
2 scripts/compressed/history.adapter.mootools.min.js
@@ -0,0 +1,2 @@
+(function(g,e){var d=e.History||{};if(typeof d.Adapter!=="undefined")throw Error("History.js Adapter has already been emulated...");d.Adapter={getBrowserFlag:function(){var a=["msie","mozilla","webkit","webkit","opera"],b=null;["ie","firefox","safari","chrome","opera"].each(function(c,f){if(Browser[f]){b=a[c];return false}});return b},getBrowserMajorVersion:function(){var a=null;switch(true){case Browser.ie6:a=6;break;case Browser.ie7:a=7;break;case Browser.ie8:a=8;break;case Browser.ie:a=9;break;
+case Browser.firefox2:a=2;break;case Browser.firefox3:a=3;break;case Browser.firefox:a=4;break;case Browser.safari3:a=3;break;case Browser.safari4:a=4;break;case Browser.safari:a=5;break;case Browser.chrome:a=8;break;case Browser.opera:a=10}return a},bind:function(a,b,c){return(typeof a==="string"?document.id(a):a).addEvent(b,c)},trigger:function(a,b,c){return(typeof a==="string"?document.id(a):a).fireEvent(b,c||{})}};typeof d.init!=="undefined"&&d.init()})(MooTools,window);
View
2 scripts/compressed/history.adapter.prototype.min.js
@@ -0,0 +1,2 @@
+(function(e,f){var d=f.History||{};if(typeof d.Adapter!=="undefined")throw Error("History.js Adapter has already been emulated...");d.Adapter={getBrowserFlag:function(){var b=["msie","webkit","webkit","mozilla","opera"],a=null;["IE","Opera","WebKit","MobileSafari","Gecko"].each(function(c,g){if(e.Browser[g]){a=b[c];return false}});return a},getBrowserMajorVersion:function(){var b=parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE")+5));return parseInt(b,10)},bind:function(b,
+a,c){a="widget:"+a;console.log("bind:",b,a,c);return Element.observe(b,a,c)},trigger:function(b,a,c){a="widget:"+a;console.log("trigger:",b,a,c);return Element.fire(b,a,c)}};typeof d.init!=="undefined"&&d.init()})(Prototype,window);
View
7 scripts/compressed/history.min.js
@@ -0,0 +1,7 @@
+(function(e){var a=e.History||{},g=e.history;if(typeof a.emulated!=="undefined")throw Error("History.js has already been emulated...");a.init=function(){console.info("History.init",this,arguments);a.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in document)||a.Adapter.getBrowserFlag()==="msie"&&a.Adapter.getBrowserMajorVersion()<8)};a.setHash=function(b){console.info("History.setHash",this,arguments);return document.location.hash=
+b};a.getHash=function(){console.info("History.getHash",this,arguments);return a.extractHash(document.location.hash)};a.extractHash=function(b){console.info("History.extractHash",this,arguments);return String(b).replace(/^[^#]*#/,"").replace(/^#+|#+$/,"")};a.extractUrl=function(b){console.info("History.extractUrl",this,arguments);return String(b).replace(/^#+|#+$/,"")};a.getStateObject=function(b,d,c){console.info("History.getStateObject",this,arguments);return{data:b,title:d,url:c}};a.getStateHash=
+function(b,d,c){console.info("History.getStateHash",this,arguments);return JSON.stringify(a.getStateObject(b,d,c))};a.currentState=a.getStateObject({},document.title,document.location.href);a.getState=function(){console.info("History.getState",this,arguments);return a.currentState};a.Adapter.bind(e,"popstate",function(b,d){console.info("History.popstate",this,arguments);var c={};if(b&&b.state)c=b.state;else if(b&&b.originalEvent&&b.originalEvent.state)c=b.originalEvent.state;else if(b&&b.memo&&b.memo.state)c=
+b.memo.state;else if(d&&d.state)c=d.state;c=a.getStateObject(c,document.title,document.location.href);a.currentState=c;return true});a.pushStateAndTrigger=function(b,d,c){a.pushState(b,d,c);a.Adapter.trigger(e,"popstate",{state:b});return true};a.replaceStateAndTrigger=function(b,d,c){a.replaceState(b,d,c);a.Adapter.trigger(e,"popstate",{state:b});return true};if(a.emulated.pushState){a.Adapter.bind(e,"hashchange",function(b){console.info("History.hashchange",this,arguments);var d=unescape(a.extractHash(b.newURL||
+document.location)),c=JSON.parse(d),f=a.getState();f=a.getStateHash(f.data,f.title,f.url);if(d===f)return false;if(a.discardedState(c)){g.go(-1);return false}a.pushState(c.data,c.title,c.url);return true});a.discardedStates={};a.discardState=function(b,d,c){console.info("History.discardState",this,arguments);var f=a.getStateHash(b,d,c);return a.discardedStates[f]=true};a.discardedState=function(b,d,c){console.info("History.discardedState",this,arguments);var f=a.getStateHash(b,d,c);return typeof a.discardedStates[f]!==
+"undefined"};a.recycleState=function(b,d,c){console.info("History.recycleState",this,arguments);a.discardedState(b,d,c)&&delete a.discardedStates[StateHash];return true};a.pushState=function(b,d,c){console.info("History.pushState",this,arguments);a.recycleState(b,d,c);var f=a.getStateObject(b,d,c),h=a.getStateHash(b,d,c);h=escape(h);a.Adapter.trigger(e,"popstate",{state:f.data});a.currentState=f;a.getHash()!==h&&a.setHash(h);return true};a.replaceState=function(b,d){console.info("History.replaceState",
+this,arguments);var c=a.getState();a.pushState(b,d,data);a.discardState(c.data,c.title,c.url);return true}}else{a.pushState=function(){g.pushState.apply(g,arguments)};a.replaceState=function(){g.replaceState.apply(g,arguments)};a.go=function(){g.go.apply(g,arguments)};a.back=function(){g.back.apply(g,arguments)};a.forward=function(){g.forward.apply(g,arguments)}}};typeof a.Adapter!=="undefined"&&a.init();e.History=a})(window);
View
121 scripts/uncompressed/history.adapter.dojo.js
@@ -0,0 +1,121 @@
+// History.js Dojo Adapter
+// New-BSD License, Copyright 2011 Benjamin Arthur Lupton <contact@balupton.com>
+
+(function(MooTools,window,undefined){
+
+ // --------------------------------------------------------------------------
+ // Initialise
+
+ // Localise Globals
+ var
+ History = window.History||{},
+ history = window.history;
+
+ // Check Existence of Adapter
+ if ( typeof History.Adapter !== 'undefined' ) {
+ throw new Error('History.js Adapter has already been emulated...');
+ }
+
+ // Add the Adapter
+ History.Adapter = {
+
+ /**
+ * History.Adapter.getBrowserFlag()
+ * @return [msie,webkit,mozilla,opera]
+ */
+ getBrowserFlag: function(){
+ var
+ flags_out = ['msie','mozilla','webkit','webkit','opera'],
+ flags_in = ['ie','firefox','safari','chrome','opera'],
+ result = null;
+
+ flags_in.each(function(i,flag){
+ if ( Browser[flag]||false ) {
+ result = flags_out[i];
+ return false;
+ }
+ });
+
+ return result;
+ },
+
+ /**
+ * History.Adapter.getBrowserMajorVersion()
+ * @return integer
+ */
+ getBrowserMajorVersion: function(){
+ var version = null;
+ switch ( true ) {
+ case Browser.ie6:
+ version = 6;
+ break;
+ case Browser.ie7:
+ version = 7;
+ break;
+ case Browser.ie8:
+ version = 8;
+ break;
+ case Browser.ie:
+ version = 9;
+ break;
+ case Browser.firefox2:
+ version = 2;
+ break;
+ case Browser.firefox3:
+ version = 3;
+ break;
+ case Browser.firefox:
+ version = 4;
+ break;
+ case Browser.safari3:
+ version = 3;
+ break;
+ case Browser.safari4:
+ version = 4;
+ break;
+ case Browser.safari:
+ version = 5;
+ break;
+ case Browser.chrome:
+ version = 8;
+ break;
+ case Browser.opera:
+ version = 10;
+ break
+ }
+
+ return version;
+ },
+
+ /**
+ * History.Adapter.bind(el,event,callback)
+ * @param element
+ * @param string event
+ * @param function callback
+ * @return element
+ */
+ bind: function(el,event,callback){
+ var El = typeof el === 'string' ? document.id(el) : el;
+ return El.addEvent(event,callback);
+ },
+
+ /**
+ * History.Adapter.trigger(el,event,data)
+ * @param element
+ * @param string event
+ * @param object data
+ * @return element
+ */
+ trigger: function(el,event,data){
+ var El = typeof el === 'string' ? dojo.byId(el) : el;
+ return El.fireEvent(event,data||{});
+ }
+ };
+
+ // Check Load Status
+ if ( typeof History.init !== 'undefined' ) {
+ // History.js loaded faster than the Adapter, Fire init
+ History.init();
+ }
+
+})(dojo,window);
View
88 scripts/uncompressed/history.js
@@ -40,8 +40,8 @@
/**
* History.setHash(hash)
* Sets the document hash
- * @param string hash
- * @return string
+ * @param {string} hash
+ * @return {string}
*/
History.setHash = function(hash){
if(debug)console.info('History.setHash',this,arguments);
@@ -52,7 +52,7 @@
/**
* History.getHash()
* Gets the current document hash
- * @return string
+ * @return {string}
*/
History.getHash = function(){
if(debug)console.info('History.getHash',this,arguments);
@@ -63,8 +63,8 @@
/**
* History.extractHash(url)
* Extracts the Hash from a URL
- * @param string url
- * @return string url
+ * @param {string} url
+ * @return {string} url
*/
History.extractHash = function(url){
if(debug)console.info('History.extractHash',this,arguments);
@@ -81,8 +81,8 @@
/**
* History.extractUrl(url)
* Extracts the Url from a URL (removes the hash)
- * @param string url
- * @return string url
+ * @param {string} url
+ * @return {string} url
*/
History.extractUrl = function(url){
if(debug)console.info('History.extractUrl',this,arguments);
@@ -99,10 +99,10 @@
/**
* History.getStateObject(data,title,url)
* Creates a object based on the data, title and url state params
- * @param object data
- * @param string title
- * @param string url
- * @return object
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {object}
*/
History.getStateObject = function(data,title,url){
if(debug)console.info('History.getStateObject',this,arguments);
@@ -120,10 +120,10 @@
/**
* History.getStateHash(data,title,url)
* Creates a Hash for the State Object
- * @param object data
- * @param string title
- * @param string url
- * @return string
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {string}
*/
History.getStateHash = function(data,title,url){
if(debug)console.info('History.getStateHash',this,arguments);
@@ -143,7 +143,7 @@
/**
* History.getState()
* Get an object containing the data, title and url of the current state
- * @return object {data,title,url}
+ * @return {object} {data,title,url}
*/
History.getState = function(){
if(debug)console.info('History.getState',this,arguments);
@@ -176,10 +176,10 @@
/**
* History.pushStateAndTrigger(data,title,url)
* Add a new State to the history object, become it, and trigger onpopstate
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.pushStateAndTrigger = function(data,title,url){
// Push the State
@@ -197,10 +197,10 @@
/**
* History.replaceStateAndTrigger(data,title,url)
* Replace the State and trigger onpopstate
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.replaceStateAndTrigger = function(data,title,url){
// Push the State
@@ -380,10 +380,10 @@
/**
* History.discardState(data,title,url)
* Discards the state by ignoring it through History
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.discardState = function(data,title,url){
if(debug)console.info('History.discardState',this,arguments);
@@ -400,10 +400,10 @@
/**
* History.discardState(data,title,url)
* Checks to see if the state is discarded
- * @param object data
- * @param string title
- * @param string url
- * @return bool
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {bool}
*/
History.discardedState = function(data,title,url){
if(debug)console.info('History.discardedState',this,arguments);
@@ -420,10 +420,10 @@
/**
* History.recycleState(data,title,url)
* Allows a discarded state to be used again
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.recycleState = function(data,title,url){
if(debug)console.info('History.recycleState',this,arguments);
@@ -439,10 +439,10 @@
/**
* History.pushState(data,title,url)
* Add a new State to the history object and become it
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.pushState = function(data,title,url){
if(debug)console.info('History.pushState',this,arguments);
@@ -475,10 +475,10 @@
/**
* History.replaceState(data,title,url)
* Replaces the current State with the new State
- * @param object data
- * @param string title
- * @param string url
- * @return true
+ * @param {object} data
+ * @param {string} title
+ * @param {string} url
+ * @return {true}
*/
History.replaceState = function(state,title,url){
if(debug)console.info('History.replaceState',this,arguments);

0 comments on commit f2651bd

Please sign in to comment.
Something went wrong with that request. Please try again.