Skip to content

Commit

Permalink
Merge pull request #408 from jsoref/issue-349
Browse files Browse the repository at this point in the history
improve handling of noscript (related to #349)
  • Loading branch information
KharitonOff committed Feb 6, 2019
2 parents 64edc29 + 9780f27 commit acab844
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var filters = angular.module('cla.filters', []);

angular.element(document).ready(function () {
angular.bootstrap(document, ['app']);
angular.element(document.querySelectorAll('.needs-javascript')).removeClass('needs-javascript');
});

// *************************************************************
Expand Down
4 changes: 4 additions & 0 deletions src/client/assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -598,3 +598,7 @@ a.anchor .octicon-link {
font-size: smaller;
display: inline-block;
}

.needs-javascript {
display: none;
}
10 changes: 6 additions & 4 deletions src/client/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
<div class="navbar-home-left">
<div ng-show="!!user.value.login">
<a ng-href="{{user.value.html_url}}" target="spcae">
<img ng-src="{{ user.value.avatarUrl }}" style="height:25px;" />
<img class="needs-javascript" alt="[ {{ user.value.login }} avatar ]" ng-src="{{ user.value.avatarUrl }}" style="height:25px;" />
<a class="navbar-text-hide">&nbsp; Hey,
<b>{{ user.value.login }}</b>!</a>
<noscript>GitHub user whose browser isn't processing JavaScript</noscript>
<b class="needs-javascript">{{ user.value.login }}</b>!
</a>
</a>
</div>
</div>
Expand All @@ -56,7 +58,7 @@
</div>
<div class="navbar-center">
<a href="/">
<img class="center-block img-responsive" src="/assets/images/logo_b.svg" style="width:55px;">
<img class="center-block img-responsive" src="/assets/images/logo_b.svg" alt="[ CLA - assistant ]" style="width:55px;">
</a>
</div>
</div>
Expand Down Expand Up @@ -99,4 +101,4 @@
</div>
</body>

</html>
</html>

0 comments on commit acab844

Please sign in to comment.