Cleaning js (#858)

* Clean some js file

* Cleaning code
This commit is contained in:
corentinheadoo 2016-10-17 18:17:18 +02:00 committed by Marcus Bointon
parent a55b67d965
commit 66cf4fbaff
2 changed files with 6 additions and 14 deletions

View File

@ -23,24 +23,23 @@ dp.SyntaxHighlighter = {
return match.value;
return null;
};
}
function defaultValue(value, def)
{
return value != null ? value : def;
};
}
function asString(value)
{
return value != null ? value.toString() : null;
};
}
var parts = input.split(':'),
brushName = parts[0],
options = {},
straight = { 'true' : true }
straight = { 'true' : true },
reverse = { 'true' : false },
result = null,
defaults = SyntaxHighlighter.defaults
;
@ -89,7 +88,7 @@ dp.SyntaxHighlighter = {
}
return null;
};
}
function findTagsByName(list, name, tagName)
{

View File

@ -461,7 +461,6 @@ function tln_deent(&$attvalue, $regex, $hex = false)
* checks on them.
*
* @param string $attvalue A string to run entity check against.
* @return Void, modifies a reference value.
*/
function tln_defang(&$attvalue)
{
@ -488,7 +487,6 @@ function tln_defang(&$attvalue)
* be funny to make "java[tab]script" be just as good as "javascript".
*
* @param string $attvalue The attribute value before extraneous spaces removed.
* @return Void, modifies a reference value.
*/
function tln_unspace(&$attvalue)
{
@ -511,7 +509,7 @@ function tln_unspace(&$attvalue)
* @param array $add_attr_to_tag See description for tln_sanitize
* @param string $trans_image_path
* @param boolean $block_external_images
* @return Array with modified attributes.
* @return array with modified attributes.
*/
function tln_fixatts(
$tagname,
@ -667,9 +665,7 @@ function tln_fixurl($attname, &$attvalue, $trans_image_path, $block_external_ima
function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
{
$me = 'tln_fixstyle';
// workaround for </style> in between comments
$iCurrentPos = $pos;
$content = '';
$sToken = '';
$bSucces = false;
@ -740,8 +736,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
*/
$content = preg_replace("|body(\s*\{.*?\})|si", ".bodyclass\\1", $content);
$trans_image_path = $trans_image_path;
/**
* Fix url('blah') declarations.
*/
@ -796,7 +790,6 @@ function tln_fixstyle($body, $pos, $trans_image_path, $block_external_images)
function tln_body2div($attary, $trans_image_path)
{
$me = 'tln_body2div';
$divattary = array('class' => "'bodyclass'");
$text = '#000000';
$has_bgc_stl = $has_txt_stl = false;