Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0 and v1.4 #51

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/docs
/node_modules
/shared
/unit
/examples
/document-domain.html
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0] - 2020-04-18

### Removed
- Drop support for IE

### Changed

- Clean and remove trailing whitespaces from JS file

### Notes

- I did not test anything.

## [1.4] - 2020-04-18

### Fixed
- Support for jQuery 1.9
- IE detection

### Added
- Unit test for jQuery 1.7.2
- package.json
- publish to NPM

## [1.3] - 2010-07-21
- Reorganized IE6/7 Iframe code to make it more
"removable" for mobile-only development. Added IE6/7 document.title
support. Attempted to make Iframe as hidden as possible by using
techniques from http://www.paciellogroup.com/blog/?p=604. Added
support for the "shortcut" format $(window).hashchange( fn ) and
$(window).hashchange() like jQuery provides for built-in events.
Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
and <jQuery.fn.hashchange.src> properties plus document-domain.html
file to address access denied issues when setting document.domain in
IE6/7.

## [1.2] - 2010-01-11
- Fixed a bug where coming back to a page using this plugin
from a page on another domain would cause an error in Safari 4. Also,
IE6/7 Iframe is now inserted after the body (this actually works),
which prevents the page from scrolling when the event is first bound.
Event can also now be bound before DOM ready, but it won't be usable
before then in IE6/7.

## [1.1] - 2010-01-21
- Incorporated document.documentMode test to fix IE8 bug
where browser version is incorrectly reported as 8.0, despite
inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.

## [1.0] - 2010-01-09
- Initial Release. Broke out the jQuery BBQ event.special
window.onhashchange functionality into a separate plugin for users
who want just the basic event & back button support, without all the
extra awesomeness that BBQ provides. This plugin will be included as
part of jQuery BBQ, but also be available separately.

[Unreleased]: https://github.com/cowboy/jquery-hashchange/compare/v1.3...HEAD
[v1.3]: https://github.com/cowboy/jquery-hashchange/compare/v1.2...v1.3
[v1.2]: https://github.com/cowboy/jquery-hashchange/compare/v1.1...v1.2
[v1.1]: https://github.com/cowboy/jquery-hashchange/compare/v1.0...v1.1
[v1.0]: https://github.com/cowboy/jquery-hashchange/releases/tag/v1.0
23 changes: 10 additions & 13 deletions README.markdown → README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# jQuery hashchange event #
[http://benalman.com/projects/jquery-hashchange-plugin/](http://benalman.com/projects/jquery-hashchange-plugin/)

Version: 1.3, Last updated: 7/21/2010
Version: 2.0, Last updated: 4/18/2020

This jQuery plugin enables very basic bookmarkable #hash history via a cross-browser window.onhashchange event.

Expand All @@ -16,7 +16,7 @@ Visit the [project page](http://benalman.com/projects/jquery-hashchange-plugin/)
These working examples, complete with fully commented code, illustrate a few
ways in which this plugin can be used.

[http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/](http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/)
[http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/](http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/)
[http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/](http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/)

## Support and Testing ##
Expand All @@ -43,31 +43,28 @@ This plugin is, by design, very basic. If you want to add lot of extra utility a

While this jQuery hashchange event implementation is quite stable and robust, there are a few unfortunate browser bugs surrounding expected hashchange event-based behaviors, independent of any JavaScript window.onhashchange abstraction. See the following examples for more information:

Chrome: Back Button
Chrome: Back Button
[http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/](http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/)

Firefox: Remote XMLHttpRequest
Firefox: Remote XMLHttpRequest
[http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/](http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/)

WebKit: Back Button in an Iframe
WebKit: Back Button in an Iframe
[http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/](http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/)

Safari: Back Button from a different domain
Safari: Back Button from a different domain
[http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/](http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/)

Also note that should a browser natively support the window.onhashchange
Also note that should a browser natively support the window.onhashchange
event, but not report that it does, the fallback polling loop will be used.


## Release History ##

1.3 - (7/21/2010) Reorganized IE6/7 Iframe code to make it more "removable" for mobile-only development. Added IE6/7 document.title support. Attempted to make Iframe as hidden as possible by using techniques from http://www.paciellogroup.com/blog/?p=604. Added support for the "shortcut" format $(window).hashchange( fn ) and $(window).hashchange() like jQuery provides for built-in events. Renamed jQuery.hashchangeDelay to jQuery.fn.hashchange.delay and lowered its default value to 50. Added jQuery.fn.hashchange.domain and jQuery.fn.hashchange.src properties plus document-domain.html file to address access denied issues when setting document.domain in IE6/7.
1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin from a page on another domain would cause an error in Safari 4. Also, IE6/7 Iframe is now inserted after the body (this actually works), which prevents the page from scrolling when the event is first bound. Event can also now be bound before DOM ready, but it won't be usable before then in IE6/7.
1.1 - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug where browser version is incorrectly reported as 8.0, despite inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
1.0 - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special window.onhashchange functionality into a separate plugin for users who want just the basic event & back button support, without all the extra awesomeness that BBQ provides. This plugin will be included as part of jQuery BBQ, but also be available separately.
[CHANGELOG.md](CHANGELOG.md)


## License ##
Copyright (c) 2010 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.
Copyright (c) 2010 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.
[http://benalman.com/about/license/](http://benalman.com/about/license/)
Loading