Code cleanup
This commit is contained in:
committed by
Robin North
parent
57aed828ac
commit
6fb509a021
@@ -13,7 +13,7 @@ var formAction = function(el, event) {
|
||||
// Initialize requestOptions
|
||||
options.requestOptions = {
|
||||
requestUrl: el.getAttribute("action") || window.location.href,
|
||||
requestMethod: el.getAttribute("method") || "GET",
|
||||
requestMethod: el.getAttribute("method") || "GET"
|
||||
}
|
||||
|
||||
// create a testable virtual link of the form action
|
||||
@@ -93,7 +93,7 @@ module.exports = function(el) {
|
||||
}
|
||||
|
||||
|
||||
if (event.keyCode == 13) {
|
||||
if (event.keyCode === 13) {
|
||||
formAction.call(that, el, event)
|
||||
}
|
||||
}.bind(this))
|
||||
|
||||
@@ -91,7 +91,7 @@ module.exports = function(el) {
|
||||
return
|
||||
}
|
||||
|
||||
if (event.keyCode == 13) {
|
||||
if (event.keyCode === 13) {
|
||||
linkAction.call(that, el, event)
|
||||
}
|
||||
}.bind(this))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
var defaultSwitches = require("../switches")
|
||||
|
||||
module.exports = function(options) {
|
||||
options = options || {}
|
||||
options.elements = options.elements || "a[href], form[action]"
|
||||
options.selectors = options.selectors || ["title", ".js-Pjax"]
|
||||
options.switches = options.switches || {}
|
||||
|
||||
Reference in New Issue
Block a user