mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-20 18:09:54 +00:00
site: chrome 52+ workaround for broken algo redirect
Since recently Chrome doesnt refresh anymore the page on goback();
This commit is contained in:
parent
1b4d4c788d
commit
defe4f9036
5 changed files with 11 additions and 16 deletions
|
@ -1022,7 +1022,11 @@ class SiteController extends CommonController
|
|||
else
|
||||
user()->setState('yaamp-algo', 'all');
|
||||
|
||||
$this->goback();
|
||||
$route = getparam('r');
|
||||
if (!empty($route))
|
||||
$this->redirect($route);
|
||||
else
|
||||
$this->goback();
|
||||
}
|
||||
|
||||
public function actionGomining()
|
||||
|
|
|
@ -133,7 +133,7 @@ function page_refresh()
|
|||
|
||||
function select_algo(algo)
|
||||
{
|
||||
window.location.href = '/site/algo?algo='+algo;
|
||||
window.location.href = '/site/algo?algo='+algo+'&r=/';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
|
|
@ -48,7 +48,7 @@ function page_refresh()
|
|||
|
||||
function select_algo(algo)
|
||||
{
|
||||
window.location.href = '/site/algo?algo='+algo;
|
||||
window.location.href = '/site/algo?algo='+algo+'&r=/site/miners';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
$algo = user()->getState('yaamp-algo');
|
||||
|
||||
JavascriptFile("/extensions/jqplot/jquery.jqplot.js");
|
||||
JavascriptFile("/extensions/jqplot/plugins/jqplot.dateAxisRenderer.js");
|
||||
JavascriptFile("/extensions/jqplot/plugins/jqplot.barRenderer.js");
|
||||
|
@ -18,9 +16,8 @@ if($user)
|
|||
|
||||
$coin = getdbo('db_coins', $user->coinid);
|
||||
if($coin) echo <<<END
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('#favicon').remove();
|
||||
$('head').append('<link href="$coin->image" id="favicon" rel="shortcut icon">');
|
||||
});
|
||||
|
@ -31,12 +28,6 @@ END;
|
|||
$user->hostaddr = $_SERVER['REMOTE_ADDR'];
|
||||
$user->save();
|
||||
}
|
||||
|
||||
// if(!$this->admin && count($recents) > 5)
|
||||
// {
|
||||
// debuglog("$user->id, $user->username, $user->balance");
|
||||
// debuglog($recents);
|
||||
// }
|
||||
}
|
||||
|
||||
$username = $user? $user->username: '';
|
||||
|
@ -175,7 +166,7 @@ function page_refresh()
|
|||
|
||||
function select_algo(algo)
|
||||
{
|
||||
window.location.href = '/site/algo?algo='+algo;
|
||||
window.location.href = '/site/algo?algo='+algo+'&r=/site/mining';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
|
|
@ -94,7 +94,7 @@ Select Algo: <select id='algo_select'>$string</select>
|
|||
$('#algo_select').change(function(event)
|
||||
{
|
||||
var algo = $('#algo_select').val();
|
||||
window.location.href = '/site/algo?algo='+algo;
|
||||
window.location.href = '/site/algo?algo='+algo+'&r=/stats';
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue