Просмотр исходного кода

adding document title in new history state

El RIDO 9 лет назад
Родитель
Сommit
366b61c32d
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      js/privatebin.js
  2. 1 1
      tpl/bootstrap.php
  3. 1 1
      tpl/page.php

+ 1 - 1
js/privatebin.js

@@ -1121,7 +1121,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
                             deleteUrl = helper.scriptLocation() + '?pasteid=' + data.id + '&deletetoken=' + data.deletetoken;
                         controller.showStatus('');
                         controller.errorMessage.addClass('hidden');
-                        history.pushState({type: 'newpaste'}, '', url);
+                        history.pushState({type: 'newpaste'}, document.title, url);
 
                         $('#pastelink').html(
                             i18n._(

+ 1 - 1
tpl/bootstrap.php

@@ -69,7 +69,7 @@ if ($MARKDOWN):
 <?php
 endif;
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-HujncUuaZgVgfPmJ1dyHyH+kjYOH/UWW88cla+CgU6s/ncGOvo/+such9ikwKqa0/JGcHnLYlONVjt2L7oM5kA==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-bOZxf+ELU4lyYdlSIVM0z+GDBdeO1BZQvkr7HKPz89rmnw6x7w669QOsCOqLoNJ8vcIsFas288doubME9pSE4Q==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->

+ 1 - 1
tpl/page.php

@@ -47,7 +47,7 @@ if ($MARKDOWN):
 <?php
 endif;
 ?>
-		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-HujncUuaZgVgfPmJ1dyHyH+kjYOH/UWW88cla+CgU6s/ncGOvo/+such9ikwKqa0/JGcHnLYlONVjt2L7oM5kA==" crossorigin="anonymous"></script>
+		<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-bOZxf+ELU4lyYdlSIVM0z+GDBdeO1BZQvkr7HKPz89rmnw6x7w669QOsCOqLoNJ8vcIsFas288doubME9pSE4Q==" crossorigin="anonymous"></script>
 		<!--[if lt IE 10]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
 		<![endif]-->