Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Mobile banner: only show on front page
Browse files Browse the repository at this point in the history
  • Loading branch information
umbrae committed Jun 1, 2015
1 parent 80c5dfa commit 22f6444
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r2/r2/public/static/js/ui.js
Expand Up @@ -13,7 +13,8 @@ r.ui.init = function() {

// mweb beta banner
var mwebOptInCookieName = "__cf_mob_redir";
if (smallScreen && r.config.renderstyle != 'compact' && !r.ui.inMobileWebBlacklist()) {
var onFrontPage = $.url().attr('path') == '/';
if (smallScreen && onFrontPage && r.config.renderstyle != 'compact' && !r.ui.inMobileWebBlacklist()) {
var a = document.createElement('a');
a.href = window.location;
a.host = 'm.' + r.config.cur_domain;
Expand Down

0 comments on commit 22f6444

Please sign in to comment.