Add an icon in the bottom bar, to go to the top of the article

It needs to modify the way title names are displayed in the URL : replace anchors by ?title=
Fixes #36
This commit is contained in:
mossroy 2013-08-02 10:46:31 +02:00
parent 3a25688772
commit 5cd5a80551
2 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,7 @@
</head>
<body role="application">
<section id="search-article" role="region">
<header>
<header id="top">
<div class="navbar">
<div class="container">
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
@ -132,6 +132,7 @@
<div id="navigationButtons" class="btn-toolbar">
<a class="btn btn-large" id="btnBack" title="Back"><span class="glyphicon glyphicon-circle-arrow-left"></span></a>
<a class="btn btn-large" id="btnForward" title="Forward"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a class="btn btn-large pull-right" id="btnTop" title="Top" href="#top"><span class="glyphicon glyphicon-arrow-up"></span></a>
</div>
</footer>
</section>

View File

@ -378,7 +378,7 @@ define(function(require) {
function pushBrowserHistoryState(titleName) {
if (titleName) {
var stateObj = {titleName: titleName};
window.history.pushState(stateObj, "Wikipedia Article : " + titleName, "#" + titleName);
window.history.pushState(stateObj, "Wikipedia Article : " + titleName, "?title=" + titleName);
}
}