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

remove alerts when missing showdown & prettify libraries, if the are missing it is intentionally done in the configuration, fixes #237

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

+ 0 - 14
js/privatebin.js

@@ -2413,20 +2413,6 @@ jQuery.PrivateBin = (function($, RawDeflate) {
             $prettyMessage = $('#prettymessage');
             $prettyPrint = $('#prettyprint');
 
-            // check requirements
-            if (typeof prettyPrintOne !== 'function') {
-                Alert.showError([
-                    'The library %s is not available. This may cause display errors.',
-                    'pretty print'
-                ]);
-            }
-            if (typeof showdown !== 'object') {
-                Alert.showError([
-                    'The library %s is not available. This may cause display errors.',
-                    'showdown'
-                ]);
-            }
-
             // get default option from template/HTML or fall back to set value
             format = Model.getFormatDefault() || format;
             text = '';

+ 1 - 1
tpl/bootstrap.php

@@ -72,7 +72,7 @@ if ($MARKDOWN):
 endif;
 ?>
 		<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
-		<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-wrACqkssPbx5b/OLzM+ZxUP8L1AmdG+aYefO4uFG8GedXxic3R4ICkWsrPL7jYbwLzzdmnmuIYc58JhCSVh28Q==" crossorigin="anonymous"></script>
+		<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-xa4Dzm5z/8B3iElnf+46U0BMyvmDtQQdLO+O9DCnozrpuHb9YZ3MkAFMwbuytSgFx76FNvp/aQhTwqM4a6qbow==" crossorigin="anonymous"></script>
 		<!--[if IE]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
 		<![endif]-->

+ 1 - 1
tpl/page.php

@@ -50,7 +50,7 @@ if ($MARKDOWN):
 endif;
 ?>
 		<script type="text/javascript" data-cfasync="false" src="js/purify-1.0.11.js" integrity="sha512-p7UyJuyBkhMcMgE4mDsgK0Lz70OvetLefua1oXs1OujWv9gOxh4xy8InFux7bZ4/DAZsTmO4rgVwZW9BHKaTaw==" crossorigin="anonymous"></script>
-		<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-wrACqkssPbx5b/OLzM+ZxUP8L1AmdG+aYefO4uFG8GedXxic3R4ICkWsrPL7jYbwLzzdmnmuIYc58JhCSVh28Q==" crossorigin="anonymous"></script>
+		<script type="text/javascript" data-cfasync="false" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-xa4Dzm5z/8B3iElnf+46U0BMyvmDtQQdLO+O9DCnozrpuHb9YZ3MkAFMwbuytSgFx76FNvp/aQhTwqM4a6qbow==" crossorigin="anonymous"></script>
 		<!--[if IE]>
 		<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;}</style>
 		<![endif]-->