diff --git a/examples/flight_paths/js/example.js b/examples/flight_paths/js/example.js index 9d174f66..4af32702 100644 --- a/examples/flight_paths/js/example.js +++ b/examples/flight_paths/js/example.js @@ -73,7 +73,7 @@ Ox.load('Image', function() { /* We split the path in two parts. */ - parts = [Ox.sub(path, 0, i + 1), Ox.sub(path, i + 1)]; + parts = [path.slice(0, i + 1), path.slice(i + 1)]; /* We get the lat/lng of the points where the line leaves and enters the map... @@ -164,4 +164,4 @@ Ox.load('Image', function() { }); -}); \ No newline at end of file +}); diff --git a/index.js b/index.js index 0721d2b7..b578519f 100644 --- a/index.js +++ b/index.js @@ -607,7 +607,7 @@ Ox.load(function() { }, url: { get: function() { - var split = window.location.hash.substr(1).split('/'); + var split = window.location.hash.slice(1).split('/'); return {page: split[0], item: split[1] || ''}; }, set: function(data) { diff --git a/readme/html/_about.html b/readme/html/_about.html index 6853b8dc..9258447c 100644 --- a/readme/html/_about.html +++ b/readme/html/_about.html @@ -4,7 +4,7 @@
OxJS (pronounced oh-ex-jay-ess) is a new JavaScript library. It was originially developed as part of pan.do/ra, and is currently awaiting its first proper release. While it still has bugs, holes, design errors and lots of cruft, some parts of it may already be useful for a more general audience.
-The core of OxJS is Ox.js, a general-purpose utility library (think underscore.js, but quite different). It provides lots of tools for dealing with dates, has all the missing Math functions (plus some for geographic coordinates), methods like range or sub for those who like Python (and even some options for those who never want to write a for loop again), can tokenize and minify JavaScript, comes with its own documentation format, including inline tests, and can do about 23 other cool things.
The core of OxJS is Ox.js, a general-purpose utility library (think underscore.js, but quite different). It provides lots of tools for dealing with dates, has all the missing Math functions (plus some for geographic coordinates), methods like range for those who like Python (and even some options for those who never want to write a for loop again), can tokenize and minify JavaScript, comes with its own documentation format, including inline tests, and can do about 23 other cool things.
Then there are modules, most notably Ox.UI, a user interface library for HTML5-compliant browsers (think YUI, but again rather different). Ox.UI has tons of widgets: all the form elements you ever wanted, resizable panels and dialogs, menus that actually work, lists and tables that can hold a million items, maps and calendars done right, and a great video player. All these widgets are designed to that you can focus on your application and argue less with the DOM. And if you need to, each of them provides, by virtue of parasitical inheritance, the exact same API as a jQuery DOM object. But Ox.UI also provides a framework to bring these elements together, including custom events, keyboard focus, remote API discovery and client-side URL handling. It is ideal for real applications with back-ends that speak JSON and don't serve any HTML beyond <body></body>.
\ No newline at end of file +