├── .gitignore ├── assets ├── stylesheets │ ├── reset.css │ ├── screen.css │ ├── low_vision_screen.css │ ├── low.css │ ├── theme-default.css │ ├── low_vision_shared.css │ ├── print.css │ ├── low_vision_high.css │ ├── prettify.css │ ├── highlight │ │ └── default.min.css │ ├── shared.css │ └── high.css ├── favicon.ico ├── images │ ├── bug.png │ ├── rb.png │ ├── check.png │ ├── logo.gif │ ├── columns.jpg │ ├── download.gif │ ├── shadow.jpg │ ├── blue-columns.jpg │ ├── logo-background.jpg │ ├── code-box-top-left.gif │ ├── dotted-underline.gif │ ├── footer-background.jpg │ ├── header-background.jpg │ ├── blue-columns-home-page.jpg │ ├── code-box-bottom-right.gif │ ├── dark-dotted-underline.gif │ ├── site-links-background.gif │ ├── blue-columns-top-home-page.jpg │ └── blue-columns-bottom-home-page.jpg └── javascripts │ ├── prototype_extensions.js │ ├── firebug.js │ ├── main.js │ ├── jquery.mousewheel.min.js │ ├── keymaster.js │ ├── quicksearch.js │ ├── handlebars.runtime.js │ ├── jquery.history.js │ ├── handlebars.helpers.js │ ├── rubyfaux.js │ ├── highlight.min.js │ └── rundown.js ├── source ├── ecotemplates │ ├── document_heading.eco │ ├── title.eco │ ├── navigation.eco │ └── document_heading.js ├── handlebars │ ├── script_sidebar.handlebars │ ├── document_content.handlebars │ ├── document_heading.handlebars │ ├── script_heading.handlebars │ ├── class_heading.handlebars │ ├── title.handlebars │ ├── navigation.handlebars │ ├── script_content.handlebars │ ├── copyright.handlebars │ ├── searchbox.handlebars │ ├── method.handlebars │ ├── document_sidebar.handlebars │ ├── class_content.handlebars │ └── class_sidebar.handlebars └── coffeescripts │ ├── rubyfaux.coffee │ └── rubyfaux.js ├── Rakefile ├── README.md ├── index.html └── COPYING.md /.gitignore: -------------------------------------------------------------------------------- 1 | .fire/digest 2 | heroku 3 | website 4 | work 5 | -------------------------------------------------------------------------------- /assets/stylesheets/reset.css: -------------------------------------------------------------------------------- 1 | ul { 2 | margin: 0; 3 | padding: 0 2em; 4 | } 5 | -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/favicon.ico -------------------------------------------------------------------------------- /assets/images/bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/bug.png -------------------------------------------------------------------------------- /assets/images/rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/rb.png -------------------------------------------------------------------------------- /assets/images/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/check.png -------------------------------------------------------------------------------- /assets/images/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/logo.gif -------------------------------------------------------------------------------- /source/ecotemplates/document_heading.eco: -------------------------------------------------------------------------------- 1 | 2 |

<%= name %>

3 | -------------------------------------------------------------------------------- /source/handlebars/script_sidebar.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{> document_sidebar}} 3 | 4 | -------------------------------------------------------------------------------- /assets/images/columns.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/columns.jpg -------------------------------------------------------------------------------- /assets/images/download.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/download.gif -------------------------------------------------------------------------------- /assets/images/shadow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/shadow.jpg -------------------------------------------------------------------------------- /source/handlebars/document_content.handlebars: -------------------------------------------------------------------------------- 1 | 2 | {{markup text format}} 3 | 4 | -------------------------------------------------------------------------------- /source/handlebars/document_heading.handlebars: -------------------------------------------------------------------------------- 1 | 2 |

{{name}}

3 | -------------------------------------------------------------------------------- /source/handlebars/script_heading.handlebars: -------------------------------------------------------------------------------- 1 | 2 |

{{name}}

3 | 4 | -------------------------------------------------------------------------------- /source/handlebars/class_heading.handlebars: -------------------------------------------------------------------------------- 1 | 2 |

{{name}}

3 | 4 | -------------------------------------------------------------------------------- /assets/images/blue-columns.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/blue-columns.jpg -------------------------------------------------------------------------------- /assets/images/logo-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/logo-background.jpg -------------------------------------------------------------------------------- /assets/images/code-box-top-left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/code-box-top-left.gif -------------------------------------------------------------------------------- /assets/images/dotted-underline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/dotted-underline.gif -------------------------------------------------------------------------------- /assets/images/footer-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/footer-background.jpg -------------------------------------------------------------------------------- /assets/images/header-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/header-background.jpg -------------------------------------------------------------------------------- /assets/images/blue-columns-home-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/blue-columns-home-page.jpg -------------------------------------------------------------------------------- /assets/images/code-box-bottom-right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/code-box-bottom-right.gif -------------------------------------------------------------------------------- /assets/images/dark-dotted-underline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/dark-dotted-underline.gif -------------------------------------------------------------------------------- /assets/images/site-links-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/site-links-background.gif -------------------------------------------------------------------------------- /assets/images/blue-columns-top-home-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/blue-columns-top-home-page.jpg -------------------------------------------------------------------------------- /assets/stylesheets/screen.css: -------------------------------------------------------------------------------- 1 | /* 2 | screen.css - styles for the screen 3 | */ 4 | 5 | @import url(high.css); 6 | @import url(shared.css); 7 | -------------------------------------------------------------------------------- /assets/images/blue-columns-bottom-home-page.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/rubyfaux/master/assets/images/blue-columns-bottom-home-page.jpg -------------------------------------------------------------------------------- /assets/stylesheets/low_vision_screen.css: -------------------------------------------------------------------------------- 1 | /* 2 | low_vision_screen.css - styles for the screen for visually impaired people 3 | */ 4 | 5 | @import url(low_vision_shared.css); 6 | @import url(low_vision_high.css); 7 | -------------------------------------------------------------------------------- /source/ecotemplates/title.eco: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /source/handlebars/title.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /assets/javascripts/prototype_extensions.js: -------------------------------------------------------------------------------- 1 | 2 | // 3 | Array.prototype.contains = function(obj) { 4 | var i = this.length; 5 | while (i--) { 6 | if (this[i] == obj) { 7 | return true; 8 | } 9 | } 10 | return false; 11 | } 12 | 13 | // 14 | String.prototype.capitalize = function() { 15 | return this.charAt(0).toUpperCase() + this.slice(1); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /source/handlebars/navigation.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | -------------------------------------------------------------------------------- /source/ecotemplates/navigation.eco: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | -------------------------------------------------------------------------------- /assets/javascripts/firebug.js: -------------------------------------------------------------------------------- 1 | /* Provide console simulation for firebug-less environments */ 2 | 3 | if (!("console" in window) || !("firebug" in console)) { 4 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", 5 | "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; 6 | 7 | window.console = {}; 8 | for (var i = 0; i < names.length; ++i) 9 | window.console[names[i]] = function() {}; 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /assets/stylesheets/low.css: -------------------------------------------------------------------------------- 1 | /* 2 | low.css - styles for legacy browsers 3 | */ 4 | 5 | a { 6 | color: #3256B6; 7 | } 8 | a:visited { 9 | color: #7130B8; 10 | } 11 | a:hover, a:visited:hover { 12 | color: #C61A1A; 13 | } 14 | a img { border: 0; } 15 | body { 16 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 17 | } 18 | h1, h2, h3, h4, h5, h6 { 19 | font-family: Georgia, Palatino, "Times New Roman", Times, serif; 20 | } 21 | h1 { 22 | font-size: 300%; 23 | font-weight: normal; 24 | } 25 | .hidden { 26 | display: none; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /assets/javascripts/main.js: -------------------------------------------------------------------------------- 1 | function openCode( url ) 2 | { 3 | window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus(); 4 | } 5 | 6 | function hookHighlightSyntax() { 7 | /* TODO: wrap code if not present? */ 8 | $('pre:not(.code)').wrapInner(''); 9 | // $('pre:not(.code)').addClass('code'); 10 | // $('pre.code').wrapInner(''); 11 | /* hljs.tabReplace = ' '; 12 | hljs.initHighlightingOnLoad('ruby', 'cpp'); */ 13 | prettyPrint(); 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /source/handlebars/script_content.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{#if requires}} 4 |

Required Files

5 | 14 | {{/if}} 15 | 16 | {{#if uri}} 17 |
18 | Click here to view source code via repository. 19 |
20 | {{/if}} 21 | 22 | {{#if source}} 23 |
{{source}}
24 | {{/if}} 25 | 26 | -------------------------------------------------------------------------------- /assets/stylesheets/theme-default.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This file overrides the theme_default.css file in RDoc+. 3 | * It's a temporary solution to fix the styles issues caused 4 | * by the addition of themes to RDoc+. 5 | * Ultimately this file should be removed and other .css 6 | * files adjusted to accomodate. 7 | * 8 | * On the other hand maybe this format whould not be themable. 9 | */ 10 | 11 | 12 | h1,h2,h3,h4,h5,h6,th,dt,.h { 13 | font-family: Palatino, Times, serif; 14 | font-weight: bold; 15 | } 16 | 17 | p,li,td,dd { 18 | font-family: "Helvetica Neue", Helvetica, Tahoma, sans-serif; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /assets/stylesheets/low_vision_shared.css: -------------------------------------------------------------------------------- 1 | /* 2 | low_vision_shared.css - styles shared between print and high for visually impaired people 3 | */ 4 | 5 | @import url(shared.css); 6 | 7 | body { 8 | font-size: 90%; 9 | } 10 | #content h2 { 11 | font-size: 180%; 12 | } 13 | #content h3 { 14 | color: #b60a0a; 15 | font-size: 180%; 16 | line-height: 120%; 17 | } 18 | #content h4 { 19 | font-size: 170%; 20 | line-height: 120%; 21 | } 22 | #content h5 { 23 | font-size: 120%; 24 | line-height: 120%; 25 | } 26 | #content .post-info { 27 | color: #706f59; 28 | font-size: 100%; 29 | } 30 | #search-form .field { 31 | border: 4px solid #a3a39f; 32 | } 33 | #search-form .button { 34 | border: 4px solid #a3a39f; 35 | background-color: #f6f6e7; 36 | color: #9b9b95; 37 | font-size: 24px; 38 | } 39 | -------------------------------------------------------------------------------- /source/handlebars/copyright.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 | [debug] 7 | 8 | [validate] 9 | 10 | This website is made with 11 | Shomen and 12 | RubyFaux v{{rubyfaux_version}}. 13 | 16 |

17 | 18 | -------------------------------------------------------------------------------- /assets/stylesheets/print.css: -------------------------------------------------------------------------------- 1 | /* 2 | print.css - styles for print 3 | */ 4 | 5 | @import url(shared.css); 6 | 7 | .site-links, #sidebar-wrapper, 8 | #search-form { 9 | display: none; 10 | } 11 | #header { 12 | border: 0px solid black; 13 | border-bottom-width: 1pt; 14 | } 15 | #content-wrapper { 16 | float: left; 17 | padding-bottom: 2em; 18 | width: 100%; 19 | } 20 | #footer { 21 | border: 0px solid black; 22 | border-top-width: 1pt; 23 | } 24 | #footer p { 25 | margin-top: .5em; 26 | } 27 | #code { 28 | border: 1px solid gray; 29 | padding: 20px; 30 | } 31 | #code code { 32 | display: block; 33 | color: gray; 34 | font-family: "Lucida Console", Monaco, monospace; 35 | font-size: 90%; 36 | } 37 | #code .comment { 38 | color: green; 39 | } 40 | #code .keyword { 41 | color: blue; 42 | } 43 | #heading .multi-page { 44 | display: none; 45 | } 46 | -------------------------------------------------------------------------------- /assets/stylesheets/low_vision_high.css: -------------------------------------------------------------------------------- 1 | /* 2 | low_vision_high.css - styles for modern browsers for visually impaired people 3 | */ 4 | 5 | @import url(high.css); 6 | 7 | #content #news ul a { 8 | color: #1111ee; 9 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 10 | } 11 | #content dl dt { 12 | font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; 13 | } 14 | #sidebar { 15 | font-size: 90%; 16 | } 17 | #sidebar .navigation .menu a, 18 | #sidebar .navigation .more a { 19 | color: #1111ee; 20 | } 21 | #sidebar .navigation a { 22 | color: #1111ee; 23 | } 24 | #search-box { 25 | width: 738px; 26 | } 27 | #search-form { 28 | position: absolute; 29 | top: 57px; 30 | width: 738px; 31 | height: 50px: 32 | } 33 | #search-form .field { 34 | width: 214px; 35 | height: 48px; 36 | } 37 | #search-form .button { 38 | width: 148px; 39 | height: 48px; 40 | } 41 | -------------------------------------------------------------------------------- /source/handlebars/searchbox.handlebars: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 8 | 13 | 14 |
6 | 7 | 9 | 10 | 11 | 12 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /assets/javascripts/jquery.mousewheel.min.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * 7 | * Version: 3.0.2 8 | * 9 | * Requires: 1.2.2+ 10 | */ 11 | (function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery); -------------------------------------------------------------------------------- /assets/stylesheets/prettify.css: -------------------------------------------------------------------------------- 1 | /* FROM RUBYFAUX */ 2 | 3 | .str{color:#00cc00;} 4 | .kwd{color:#f9bb00;} 5 | .com{color:#428bdd;} 6 | .typ{color:#b53b3c;} 7 | .lit{color:#eddd3d;} 8 | .pun{color:#8aa6c1;} 9 | .pln{color:#ffffff} 10 | .tag{color:#8aa6c1;} 11 | .atn{color:#8aa6c1;} 12 | .atv{color:#00cc00;} 13 | .dec{color:#b53b3c;} 14 | 15 | /* pre.prettyprint{padding:2px;border:1px solid #888} */ 16 | 17 | @media print{ 18 | .str{color:#060} 19 | .kwd{color:#006;font-weight:bold} 20 | .com{color:#600;font-style:italic} 21 | .typ{color:#404;font-weight:bold} 22 | .lit{color:#044} 23 | .pun{color:#440} 24 | .pln{color:#449} 25 | .tag{color:#006;font-weight:bold} 26 | .atn{color:#404} 27 | .atv{color:#060} 28 | } 29 | 30 | #content pre { 31 | background-color: #eeeeff; 32 | background-position: top left; 33 | background-repeat: no-repeat; 34 | color: white; 35 | display: block; 36 | width: 100%; 37 | } 38 | 39 | #content pre code.prettyprint { 40 | background-position: bottom right; 41 | background-repeat: no-repeat; 42 | display: block; 43 | overflow: auto; 44 | font-family: monospace; /*, "Lucida Console", Monaco, monospace; */ 45 | font-size: 100%; 46 | line-height: 135%; 47 | padding: 10px 0px 10px 5px; 48 | margin-left: -5px; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /source/handlebars/method.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 |
  • 4 | 18 | 19 | {{#if interfaces.length}} 20 | {{#interfaces}} 21 | {{signature}}
    22 | {{/interfaces}} 23 | {{else}} 24 | {{name}} 25 | {{/if}} 26 | 27 | {{#if source}} 28 | 31 | {{/if}} 32 | 33 | {{#if comment}} 34 | {{markup comment format}} 35 | {{/if}} 36 | 37 | {{#if aliases.length}} 38 |
    39 | This method is also aliased as 40 | {{#doc aliases}} 41 | {{#if id}} 42 | {{name}}   43 | {{else}} 44 | {{this}} 45 | {{/if}} 46 | {{/doc}} 47 |
    48 | {{/if}} 49 |
  • 50 | 51 | -------------------------------------------------------------------------------- /assets/stylesheets/highlight/default.min.css: -------------------------------------------------------------------------------- 1 | pre code{display:block;padding:.5em;background:#f0f0f0}pre code,pre .ruby .subst,pre .tag .title,pre .lisp .title{color:black}pre .string,pre .title,pre .constant,pre .parent,pre .tag .value,pre .rules .value,pre .rules .value .number,pre .preprocessor,pre .ruby .symbol,pre .ruby .symbol .string,pre .ruby .symbol .keyword,pre .ruby .symbol .keymethods,pre .instancevar,pre .aggregate,pre .template_tag,pre .django .variable,pre .smalltalk .class,pre .addition,pre .flow,pre .stream,pre .bash .variable,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .tex .special,pre .erlang_repl .function_or_atom{color:#800}pre .comment,pre .annotation,pre .template_comment,pre .diff .header,pre .chunk{color:#888}pre .number,pre .date,pre .regexp,pre .literal,pre .smalltalk .symbol,pre .smalltalk .char,pre .go .constant,pre .change{color:#080}pre .label,pre .javadoc,pre .ruby .string,pre .decorator,pre .filter .argument,pre .localvars,pre .array,pre .attr_selector,pre .important,pre .pseudo,pre .pi,pre .doctype,pre .deletion,pre .envvar,pre .shebang,pre .apache .sqbracket,pre .nginx .built_in,pre .tex .formula,pre .erlang_repl .reserved,pre .input_number{color:#88F}pre .css .tag,pre .javadoctag,pre .phpdoc,pre .yardoctag{font-weight:bold}pre .keyword,pre .id,pre .phpdoc,pre .title,pre .built_in,pre .aggregate,pre .smalltalk .class,pre .winutils,pre .bash .variable,pre .apache .tag,pre .go .typename,pre .tex .command{font-weight:bold}pre .nginx .built_in{font-weight:normal}pre .xml .css,pre .xml .javascript,pre .xml .vbscript,pre .tex .formula{opacity:.5} -------------------------------------------------------------------------------- /source/ecotemplates/document_heading.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | this.ecoTemplates || (this.ecoTemplates = {}); 3 | this.ecoTemplates["document_heading"] = function(__obj) { 4 | if (!__obj) __obj = {}; 5 | var __out = [], __capture = function(callback) { 6 | var out = __out, result; 7 | __out = []; 8 | callback.call(this); 9 | result = __out.join(''); 10 | __out = out; 11 | return __safe(result); 12 | }, __sanitize = function(value) { 13 | if (value && value.ecoSafe) { 14 | return value; 15 | } else if (typeof value !== 'undefined' && value != null) { 16 | return __escape(value); 17 | } else { 18 | return ''; 19 | } 20 | }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; 21 | __safe = __obj.safe = function(value) { 22 | if (value && value.ecoSafe) { 23 | return value; 24 | } else { 25 | if (!(typeof value !== 'undefined' && value != null)) value = ''; 26 | var result = new String(value); 27 | result.ecoSafe = true; 28 | return result; 29 | } 30 | }; 31 | if (!__escape) { 32 | __escape = __obj.escape = function(value) { 33 | return ('' + value) 34 | .replace(/&/g, '&') 35 | .replace(//g, '>') 37 | .replace(/"/g, '"'); 38 | }; 39 | } 40 | (function() { 41 | (function() { 42 | 43 | __out.push('\n

    '); 44 | 45 | __out.push(__sanitize(name)); 46 | 47 | __out.push('

    \n'); 48 | 49 | }).call(this); 50 | 51 | }).call(__obj); 52 | __obj.safe = __objSafe, __obj.escape = __escape; 53 | return __out.join(''); 54 | }; 55 | }).call(this); 56 | -------------------------------------------------------------------------------- /source/handlebars/document_sidebar.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 14 |


    15 | 16 | 17 | {{#if documents.length}} 18 | 26 | {{/if}} 27 | 28 | 29 | {{#if classes.length}} 30 | 39 | {{/if}} 40 | 41 | 42 | {{#if methods.length}} 43 | 56 | {{/if}} 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /assets/javascripts/keymaster.js: -------------------------------------------------------------------------------- 1 | // keymaster.js 2 | // (c) 2011 Thomas Fuchs 3 | // keymaster.js may be freely distributed under the MIT license. 4 | (function(a){function m(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,function(){c(window.event)})}function l(a){e=a||"all"}function k(a,b,d){var e,h,i,j;d===undefined&&(d=b,b="all"),a=a.replace(/\s/g,""),e=a.split(","),e[e.length-1]==""&&(e[e.length-2]+=",");for(i=0;i1){h=a.slice(0,a.length-1);for(j=0;j0;for(j in d)if(!d[j]&&h(i.mods,+j)>-1||d[j]&&h(i.mods,+j)==-1)m=!1;(i.mods.length==0&&!d[16]&&!d[18]&&!d[17]&&!d[91]||m)&&i.method(a,i)===!1&&(a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.cancelBubble&&(a.cancelBubble=!0))}}}}function h(a,b){var c=a.length;while(c--)if(a[c]===b)return c;return-1}var b,c={},d={16:!1,18:!1,17:!1,91:!1},e="all",f={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},g={backspace:8,tab:9,clear:12,enter:13,"return":13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,"delete":46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220};for(b=1;b<20;b++)f["f"+b]=111+b;for(b in f)k[b]=!1;m(document,"keydown",i),m(document,"keyup",j),a.key=k,a.key.setScope=l,typeof module!="undefined"&&(module.exports=key)})(this) -------------------------------------------------------------------------------- /assets/stylesheets/shared.css: -------------------------------------------------------------------------------- 1 | /* 2 | shared.css - styles shared between print and high 3 | 4 | TODO: The css for this seems way to complicated. 5 | We need to use sass. 6 | */ 7 | 8 | /* reverse theme */ 9 | 10 | body { 11 | font-size: 80%; 12 | } 13 | 14 | li p { margin: 5px; } 15 | pre { padding-left: 10px; } 16 | 17 | .hidden-modern { 18 | position: absolute; 19 | left: -20000px; 20 | top: -20000px; 21 | } 22 | .site-links .separator { display: none; } 23 | .site-links { 24 | background-color: #7d0000; 25 | } 26 | #content h2 { 27 | font-size: 170%; 28 | margin-top: 1.5em; 29 | } 30 | #content h3 { 31 | color: #c61a1a; 32 | font-weight: normal; 33 | font-size: 170%; 34 | line-height: 110%; 35 | /*margin-top: 1.5em;*/ 36 | margin-bottom: 0.25em; 37 | padding-bottom: 0; 38 | } 39 | #content .post { 40 | margin-bottom: 2em; 41 | } 42 | #content h4 { 43 | font-weight: normal; 44 | font-size: 160%; 45 | line-height: 110%; 46 | margin-top: 2em; 47 | margin-bottom: 1em; 48 | } 49 | #content h5 { 50 | font-weight: bold; 51 | font-size: 110%; 52 | line-height: 110%; 53 | margin-top: 2em; 54 | margin-bottom: 1em; 55 | } 56 | #content p { 57 | margin-top: 0; 58 | } 59 | #content .post-info { 60 | color: #b0af99; 61 | font-size: 80%; 62 | } 63 | #search-form .field { 64 | border: 1px solid #d3d3cf; 65 | } 66 | #search-form .button { 67 | border: 1px solid #d3d3cf; 68 | background-color: #e6e6d7; 69 | color: #7b7b75; 70 | font-family: Georgia, Palatino, "Times New Roman", Times, serif; 71 | font-size: 14px; 72 | font-weight: bold; 73 | } 74 | #footer { 75 | clear: both; 76 | } 77 | 78 | 79 | /* layouts */ 80 | 81 | #home-page-layout h3 { 82 | margin-top: 1.5em; 83 | margin-bottom: .5em; 84 | } 85 | 86 | 87 | #content pre { 88 | background-color: #eeeeff; 89 | background-position: left top; 90 | background-repeat: no-repeat; 91 | color: white; 92 | display: block; 93 | width: 100%; 94 | } 95 | #content pre code.prettyprint { 96 | background-position: right bottom; 97 | background-repeat: no-repeat; 98 | display: block; 99 | font-family: monospace; 100 | font-size: 100%; 101 | line-height: 135%; 102 | margin-left: -5px; 103 | overflow: auto; 104 | padding: 10px 0 10px 5px; 105 | color: white; 106 | } 107 | 108 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | ignore 'website', 'heroku' 4 | 5 | #include ShellUtils #why does this not work ? 6 | 7 | # 8 | # Run thin server to give site a spin. 9 | # 10 | desc "start thin server" 11 | task "serve" do 12 | sh "thin start -A file" 13 | end 14 | 15 | # 16 | # Compile Handlebar.js templates. 17 | # 18 | desc "compile hnadle bar templates" 19 | task 'compile' do 20 | sh "handlebars source/handlebars/*.handlebars -f assets/javascripts/handlebars.templates.js" 21 | end 22 | 23 | # 24 | # The publish task uses the detroit-github plugin 25 | # from the Detroit project. 26 | # 27 | desc 'prepare' 28 | task 'prepare' do 29 | github.prepare 30 | end 31 | 32 | desc 'publish' 33 | task 'publish' do 34 | #mkdir_p 'website' 35 | #cp 'index.html', 'website/' 36 | #cp 'doc.json', 'website/' 37 | #cp_r 'assets', 'website/' 38 | github.publish 39 | end 40 | 41 | # 42 | # Helper method create Detroit::GitHub instace. 43 | # 44 | def github 45 | @github ||= ( 46 | require 'detroit' 47 | require 'detroit-github' 48 | Detroit::GitHub.new( 49 | :folder => 'website' 50 | #:sitemap => { 51 | # 'index.html' => 'index.html', 52 | # 'doc.json' => 'doc.json', 53 | # 'assets' => 'assets' 54 | #} 55 | ) 56 | ) 57 | end 58 | 59 | # Copy project files in website directory. 60 | desc 'update website files' 61 | task 'web:update' do 62 | mkdir_p 'website' 63 | install 'index.html', 'website/index.html' 64 | install 'doc.json', 'website/doc.json' 65 | sync 'assets', 'website/assets' 66 | end 67 | 68 | desc 'publish website' 69 | task 'web:publish' => ['web:update'] do 70 | cd 'website' do 71 | sh 'git add index.html doc.json assets' 72 | sh 'git commit -a -m "Automatic update."' 73 | sh 'git push origin gh-pages' 74 | end 75 | end 76 | 77 | desc 'publish to heroku' 78 | task 'heroku' do 79 | mkdir_p 'heroku' 80 | install 'index.html', 'heroku/index.html' 81 | install 'doc.json', 'heroku/doc.json' 82 | sync 'assets', 'heroku/assets' 83 | 84 | cd 'heroku' do 85 | sh 'git add index.html doc.json assets' 86 | sh 'git commit -a -m "Automatic update."' 87 | sh 'git push orgin master' 88 | end 89 | end 90 | 91 | file 'source/handlebars/*.handlebars' do 92 | run :compile 93 | end 94 | 95 | #group :web do 96 | # file 'assets' do |paths| 97 | # sync 'assets', 'website/assets' 98 | # end 99 | # 100 | # file 'index.html' do 101 | # install 'index.html', 'website/index.html' 102 | # end 103 | #end 104 | 105 | -------------------------------------------------------------------------------- /source/handlebars/class_content.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | {{#unless_header}} 5 |

    {{name}}

    6 | {{/unless_header}} 7 | {{markup comment format}} 8 |
    9 | 10 | 11 | {{#if includes.length}} 12 |

    Inclusions

    13 | 24 | {{/if}} 25 | 26 | 27 | {{#if extensions.length}} 28 |

    Extensions

    29 | 40 | {{/if}} 41 | 42 | 43 | {{#if_namespace}} 44 |

    Classes and Modules

    45 | 55 | {{/if_namespace}} 56 | 57 | 58 | {{#if constants.length}} 59 |

    Constants

    60 | 72 | {{/if}} 73 | 74 | 75 | 76 | 77 | {{#if accessors.length}} 78 |

    Attributes

    79 | 96 | {{/if}} 97 | 98 | 99 | {{#methods_categorized}} 100 | {{> method}} 101 | {{/methods_categorized}} 102 | 103 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rubyfaux 2 | 3 | [Website](http://rubyworks.github.com/rubyfaux) · 4 | [Development](http://github.com/rubyworks/rubyfaux) 5 | 6 | 7 | ## Welcome 8 | 9 | Rubyfaux is a Shomen-based documentation browser with an old-school 10 | ruby-lang.org style. 11 | 12 | 13 | ## Features 14 | 15 | * Old-school ruby-lang.org style gives documentation an offical look-and-feel. 16 | * Quicksearch sidebar makes it easy to locate classes and methods. 17 | * Built on JQuery, JQuery Templates and other well supported Javascript tools. 18 | 19 | 20 | ## How To Use 21 | 22 | Generate a shomen `.json` file for you project. 23 | 24 | $ cd .. 25 | $ shomen rdoc > site/foo-1.0.0.json 26 | 27 | See Shomen project to learn more about this. 28 | 29 | To locally view your documentation, clone this repo to your project's 30 | webite directory (or `gh-pages` branch if you are crazy like that). 31 | 32 | $ cd myproject 33 | $ git clone http://rubyworks.github.com/rubyfaux.git site 34 | $ cd site 35 | $ rm -rf .git 36 | 37 | By default it will look for `doc.json` so you can link that to 38 | the latest documentation file. 39 | 40 | $ ln -s foo-1.0.0.json doc.json 41 | 42 | Now fire up local directory webserver. The `shomen` command provides 43 | one (must have `sinatra` installed): 44 | 45 | $ shomen server 46 | 47 | You can also view the files directly if your browser supports local 48 | ajax calls (Firefox works. Chrome? Not so much). 49 | 50 | $ firefox index.html 51 | 52 | Now then, customize that template to your little hearts desire! 53 | 54 | To view you documentation remotely, firs publish you Shomen .json 55 | file, presumably to your website, but it can be anywhere on the 56 | internet that will accept loading via ajax. 57 | 58 | Now navigate over to the Rubyfaux site setting the `doc` property 59 | in the URL to the location of the file, e.g. 60 | 61 | http://rubyworks.github.com/rubyfaux?doc=http://myorg.github.com/myapp/myapp-1.0.0.json 62 | 63 | And there you are. 64 | 65 | Note that if the documented project is large so too will be the Shomen `.json` file. 66 | In which case it take a moment for the browser to load the file. For large projects 67 | as such it is a good idea to divide documentation into a set of smaller files, rather 68 | than one big file. 69 | 70 | 71 | ## Legalease 72 | 73 | Copyright (c) 2011 Thomas Sawyer 74 | 75 | Available according to the terms of the *BSD-2-Clause* license. 76 | 77 | External libraries used: 78 | 79 | * [jQuery](http://jquery.org) 80 | * [jQuery-tmpl](http://github.com/jquery/jquery-tmpl) 81 | * [Quicksearch](http://github.com/riklomas/quicksearch) 82 | * [Highlight](http://github.com/isagalaev/highlight.js) 83 | * [Showdown](http://github.com/coreyti/showdown) 84 | * [Rundown](http://github.com/rubyworks/rundown) 85 | * [Keymaster](http://github.com/madrobby/keymaster) 86 | * [Mousewheel](http://plugins.jquery.com/project/mousewheel) 87 | 88 | -------------------------------------------------------------------------------- /source/handlebars/class_sidebar.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 |

    13 | 14 | {{#if namespace}} 15 | 29 | {{/if}} 30 | 31 | 32 | {{#if superclass}} 33 | 47 | {{/if}} 48 | 49 | 50 | {{#if includes.length}} 51 | 65 | {{/if}} 66 | 67 | 68 | {{#if modules.length}} 69 | 81 | {{/if}} 82 | 83 | 84 | {{#if classes.length}} 85 | 97 | {{/if}} 98 | 99 | 100 | {{#if methods.length}} 101 | 109 | {{/if}} 110 | 111 | 112 | 124 | 125 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | API 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 60 | 61 | 62 | 63 | 64 |
    65 | 66 | 70 | 71 |
    72 | 73 |
    74 |
    75 |
    76 | 77 |
    78 |
    79 |
    80 |
    81 |
    82 | 83 |
    84 | 85 |
    86 | 87 |
    88 | 89 | 92 | 93 |
    94 | 95 | 96 |
    97 | 98 |
    99 | 100 | 105 | 106 |
    107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /assets/javascripts/quicksearch.js: -------------------------------------------------------------------------------- 1 | function hookQuickSearch() { 2 | $('.quicksearch-field').each( function() { 3 | var searchElems = $('.quicksearch-target').find( 'li' ); 4 | //var toggle = $(this).parents('.section').find('h3 .search-toggle'); 5 | // console.debug( "Toggle is: %o", toggle ); 6 | //var qsbox = $(this).parents('form').get( 0 ); 7 | 8 | $(this).quicksearch( this, searchElems, { 9 | noSearchResultsIndicator: 'no-class-search-results', 10 | focusOnLoad: false 11 | }); 12 | 13 | //$(toggle).click( function() { 14 | // // console.debug( "Toggling qsbox: %o", qsbox ); 15 | // $(qsbox).toggle(); 16 | //}); 17 | }); 18 | }; 19 | 20 | /** 21 | * 22 | * JQuery QuickSearch - Hook up a form field to hide non-matching elements. 23 | * $Id: quicksearch.js 53 2009-01-07 02:52:03Z deveiant $ 24 | * 25 | * Author: Michael Granger 26 | * 27 | */ 28 | jQuery.fn.quicksearch = function( target, searchElems, options ) { 29 | // console.debug( "Quicksearch fn" ); 30 | 31 | var settings = { 32 | delay: 250, 33 | clearButton: false, 34 | highlightMatches: false, 35 | focusOnLoad: false, 36 | noSearchResultsIndicator: null 37 | }; 38 | if ( options ) $.extend( settings, options ); 39 | 40 | return jQuery(this).each( function() { 41 | // console.debug( "Creating a new quicksearch on %o for %o", this, searchElems ); 42 | new jQuery.quicksearch( this, searchElems, settings ); 43 | }); 44 | }; 45 | 46 | 47 | jQuery.quicksearch = function( searchBox, searchElems, settings ) { 48 | var timeout; 49 | var boxdiv = $(searchBox).parents('div').eq(0); 50 | 51 | function init() { 52 | setupKeyEventHandlers(); 53 | focusOnLoad(); 54 | }; 55 | 56 | function setupKeyEventHandlers() { 57 | // console.debug( "Hooking up the 'keypress' event to %o", searchBox ); 58 | $(searchBox). 59 | unbind( 'keyup' ). 60 | keyup( function(e) { return onSearchKey( e.keyCode ); }); 61 | $(searchBox). 62 | unbind( 'keypress' ). 63 | keypress( function(e) { 64 | switch( e.which ) { 65 | // Execute the search on Enter, Tab, or Newline 66 | case 9: 67 | case 13: 68 | case 10: 69 | clearTimeout( timeout ); 70 | e.preventDefault(); 71 | doQuickSearch(); 72 | break; 73 | 74 | // Allow backspace 75 | case 8: 76 | return true; 77 | break; 78 | 79 | // Only allow valid search characters 80 | default: 81 | return validQSChar( e.charCode ); 82 | } 83 | }); 84 | }; 85 | 86 | function focusOnLoad() { 87 | if ( !settings.focusOnLoad ) return false; 88 | $(searchBox).focus(); 89 | }; 90 | 91 | function onSearchKey ( code ) { 92 | clearTimeout( timeout ); 93 | // console.debug( "...scheduling search." ); 94 | timeout = setTimeout( doQuickSearch, settings.delay ); 95 | }; 96 | 97 | function validQSChar( code ) { 98 | var c = String.fromCharCode( code ); 99 | return ( 100 | (c == ':') || 101 | (c >= 'a' && c <= 'z') || 102 | (c >= 'A' && c <= 'Z') 103 | ); 104 | }; 105 | 106 | function doQuickSearch() { 107 | var searchText = searchBox.value; 108 | var pat = new RegExp( searchText, "im" ); 109 | var shownCount = 0; 110 | 111 | if ( settings.noSearchResultsIndicator ) { 112 | $('#' + settings.noSearchResultsIndicator).hide(); 113 | } 114 | 115 | // All elements start out hidden 116 | $(searchElems).each( function(index) { 117 | var str = $(this).text(); 118 | 119 | if ( pat.test(str) ) { 120 | shownCount += 1; 121 | $(this).fadeIn(); 122 | } else { 123 | $(this).hide(); 124 | } 125 | }); 126 | 127 | if ( shownCount == 0 && settings.noSearchResultsIndicator ) { 128 | $('#' + settings.noSearchResultsIndicator).slideDown(); 129 | } 130 | }; 131 | 132 | init(); 133 | }; 134 | 135 | -------------------------------------------------------------------------------- /assets/javascripts/handlebars.runtime.js: -------------------------------------------------------------------------------- 1 | // lib/handlebars/base.js 2 | var Handlebars = {}; 3 | 4 | Handlebars.VERSION = "1.0.beta.6"; 5 | 6 | Handlebars.helpers = {}; 7 | Handlebars.partials = {}; 8 | 9 | Handlebars.registerHelper = function(name, fn, inverse) { 10 | if(inverse) { fn.not = inverse; } 11 | this.helpers[name] = fn; 12 | }; 13 | 14 | Handlebars.registerPartial = function(name, str) { 15 | this.partials[name] = str; 16 | }; 17 | 18 | Handlebars.registerHelper('helperMissing', function(arg) { 19 | if(arguments.length === 2) { 20 | return undefined; 21 | } else { 22 | throw new Error("Could not find property '" + arg + "'"); 23 | } 24 | }); 25 | 26 | var toString = Object.prototype.toString, functionType = "[object Function]"; 27 | 28 | Handlebars.registerHelper('blockHelperMissing', function(context, options) { 29 | var inverse = options.inverse || function() {}, fn = options.fn; 30 | 31 | 32 | var ret = ""; 33 | var type = toString.call(context); 34 | 35 | if(type === functionType) { context = context.call(this); } 36 | 37 | if(context === true) { 38 | return fn(this); 39 | } else if(context === false || context == null) { 40 | return inverse(this); 41 | } else if(type === "[object Array]") { 42 | if(context.length > 0) { 43 | for(var i=0, j=context.length; i 0) { 60 | for(var i=0, j=context.length; i": ">", 120 | '"': """, 121 | "'": "'", 122 | "`": "`" 123 | }; 124 | 125 | var badChars = /&(?!\w+;)|[<>"'`]/g; 126 | var possible = /[&<>"'`]/; 127 | 128 | var escapeChar = function(chr) { 129 | return escape[chr] || "&"; 130 | }; 131 | 132 | Handlebars.Utils = { 133 | escapeExpression: function(string) { 134 | // don't escape SafeStrings, since they're already safe 135 | if (string instanceof Handlebars.SafeString) { 136 | return string.toString(); 137 | } else if (string == null || string === false) { 138 | return ""; 139 | } 140 | 141 | if(!possible.test(string)) { return string; } 142 | return string.replace(badChars, escapeChar); 143 | }, 144 | 145 | isEmpty: function(value) { 146 | if (typeof value === "undefined") { 147 | return true; 148 | } else if (value === null) { 149 | return true; 150 | } else if (value === false) { 151 | return true; 152 | } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) { 153 | return true; 154 | } else { 155 | return false; 156 | } 157 | } 158 | }; 159 | })();; 160 | // lib/handlebars/runtime.js 161 | Handlebars.VM = { 162 | template: function(templateSpec) { 163 | // Just add water 164 | var container = { 165 | escapeExpression: Handlebars.Utils.escapeExpression, 166 | invokePartial: Handlebars.VM.invokePartial, 167 | programs: [], 168 | program: function(i, fn, data) { 169 | var programWrapper = this.programs[i]; 170 | if(data) { 171 | return Handlebars.VM.program(fn, data); 172 | } else if(programWrapper) { 173 | return programWrapper; 174 | } else { 175 | programWrapper = this.programs[i] = Handlebars.VM.program(fn); 176 | return programWrapper; 177 | } 178 | }, 179 | programWithDepth: Handlebars.VM.programWithDepth, 180 | noop: Handlebars.VM.noop 181 | }; 182 | 183 | return function(context, options) { 184 | options = options || {}; 185 | return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data); 186 | }; 187 | }, 188 | 189 | programWithDepth: function(fn, data, $depth) { 190 | var args = Array.prototype.slice.call(arguments, 2); 191 | 192 | return function(context, options) { 193 | options = options || {}; 194 | 195 | return fn.apply(this, [context, options.data || data].concat(args)); 196 | }; 197 | }, 198 | program: function(fn, data) { 199 | return function(context, options) { 200 | options = options || {}; 201 | 202 | return fn(context, options.data || data); 203 | }; 204 | }, 205 | noop: function() { return ""; }, 206 | invokePartial: function(partial, name, context, helpers, partials, data) { 207 | options = { helpers: helpers, partials: partials, data: data }; 208 | 209 | if(partial === undefined) { 210 | throw new Handlebars.Exception("The partial " + name + " could not be found"); 211 | } else if(partial instanceof Function) { 212 | return partial(context, options); 213 | } else if (!Handlebars.compile) { 214 | throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode"); 215 | } else { 216 | partials[name] = Handlebars.compile(partial); 217 | return partials[name](context, options); 218 | } 219 | } 220 | }; 221 | 222 | Handlebars.template = Handlebars.VM.template; 223 | ; 224 | -------------------------------------------------------------------------------- /assets/javascripts/jquery.history.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery history plugin 3 | * 4 | * The MIT License 5 | * 6 | * Copyright (c) 2006-2009 Taku Sano (Mikage Sawatari) 7 | * Copyright (c) 2010 Takayuki Miwa 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy 10 | * of this software and associated documentation files (the "Software"), to deal 11 | * in the Software without restriction, including without limitation the rights 12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | * copies of the Software, and to permit persons to whom the Software is 14 | * furnished to do so, subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | * THE SOFTWARE. 26 | */ 27 | 28 | (function($) { 29 | var locationWrapper = { 30 | put: function(hash, win) { 31 | (win || window).location.hash = this.encoder(hash); 32 | }, 33 | get: function(win) { 34 | var hash = ((win || window).location.hash).replace(/^#/, ''); 35 | try { 36 | return $.browser.mozilla ? hash : decodeURIComponent(hash); 37 | } 38 | catch (error) { 39 | return hash; 40 | } 41 | }, 42 | encoder: encodeURIComponent 43 | }; 44 | 45 | var iframeWrapper = { 46 | id: "__jQuery_history", 47 | init: function() { 48 | var html = '