Merge pull request #5839 from svbergerem/use-test-instead-of-match
Use test instead of match wherever possible
This commit is contained in:
commit
0155d8972a
2 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ app.models.Stream = Backbone.Collection.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
sortOrder : function() {
|
sortOrder : function() {
|
||||||
return this.basePath().match(/activity/) ? "interactedAt" : "createdAt";
|
return /activity/.test(this.basePath()) ? "interactedAt" : "createdAt";
|
||||||
},
|
},
|
||||||
|
|
||||||
/* This function is for adding a large number of posts one by one.
|
/* This function is for adding a large number of posts one by one.
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$(window).bind("popstate", function(){
|
$(window).bind("popstate", function(){
|
||||||
if (location.href.match(/conversations\/\d+/) !== null) {
|
if (/conversations\/\d+/.test(location.href)) {
|
||||||
$.getScript(location.href, function() {
|
$.getScript(location.href, function() {
|
||||||
Diaspora.page.directionDetector.updateBinds();
|
Diaspora.page.directionDetector.updateBinds();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue