Merge branch 'develop' into bugfix/core-GS-5596

This commit is contained in:
Jeroen De Meerleer 2018-12-20 17:31:35 +01:00
commit 5535fa9fd2
867 changed files with 24122 additions and 2186 deletions

View file

@ -2,33 +2,26 @@ Addons for Friendica
====================
This repository is a collection of addons for the [Friendica Social Communications Server](https://github.com/friendica/friendica).
You can add these addons to the /addon directory of your Friendica installation
do extend the functionality of your node.
You can add these addons to the /addon directory of your Friendica installation do extend the functionality of your node.
After uploading the addons to your server, you need to activate the desired addons
in the Admin panel. Addons not activated have no effect on your node.
After uploading the addons to your server, you need to activate the desired addons in the Admin panel. Addons not activated have no effect on your node.
You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca)
in cases the addon developers have choosen not to include them here.
You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca) in cases the addon developers have choosen not to include them here.
Connectors
----------
## Connectors
Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks
(e.g. Twitter, pump.io, Google+) that are needed for communication when the
protocoll is not supported by Friendica core (DFRN, OStatus and Diaspora).
Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks (e.g. Twitter, pump.io, Google+) that are needed for communication when the protocol is not supported by Friendica core (DFRN, OStatus and Diaspora).
For communication with contacts in networks supporting those (e.g. GNU social,
Diaspora and red#matrix) you just need to access the page configuration in the
Admin panel and enable them. For networks where communication is only possible
the API access to a remote account, you need to activate the fitting connectors.
For communication with contacts in networks supporting those (e.g. GNU social, Diaspora and red#matrix) you just need to access the page configuration in the Admin panel and enable them. For networks where communication is only possible the API access to a remote account, you need to activate the fitting connectors.
Development
-----------
## Development
The addon interface of Friendica is very flexible and powerful, so if you are
missing functionality, your chances are high it may be added with an addon.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more informations on the addon development.
The addon interface of Friendica is very flexible and powerful, so if you are missing functionality, your chances are high it may be added with an addon.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more information on the addon development.
Addons can be translated like any other part of Friendica. Translations for the
addons included in this repository are done at the [Transifex project](https://www.transifex.com/projects/p/friendica/) for Friendica.
## Translation
Addons can be translated like any other part of Friendica.
Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/master/doc/translations.md#addon).

View file

@ -34,11 +34,13 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\Model\Item;
@ -53,7 +55,6 @@ use Symfony\Component\ExpressionLanguage;
require_once 'boot.php';
require_once 'include/conversation.php';
require_once 'include/dba.php';
require_once 'include/security.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
@ -65,7 +66,7 @@ function advancedcontentfilter_install()
DBStructure::update(false, true);
logger("installed advancedcontentfilter");
Logger::log("installed advancedcontentfilter");
}
function advancedcontentfilter_uninstall()
@ -90,7 +91,7 @@ function advancedcontentfilter_dbstructure_definition(App $a, &$database)
"expression" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Expression text"],
"serialized" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Serialized parsed expression"],
"active" => ["type" => "boolean" , "not null" => "1", "default" => "1", "comment" => "Whether the rule is active or not"],
"created" => ["type" => "datetime" , "not null" => "1", "default" => NULL_DATE, "comment" => "Creation date"],
"created" => ["type" => "datetime" , "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
],
"indexes" => [
"PRIMARY" => ["id"],
@ -207,8 +208,8 @@ function advancedcontentfilter_content(App $a)
return $html;
} else {
$t = get_markup_template('settings.tpl', 'addon/advancedcontentfilter/');
return replace_macros($t, [
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/advancedcontentfilter/');
return Renderer::replaceMacros($t, [
'$messages' => [
'backtosettings' => L10n::t('Back to Addon Settings'),
'title' => L10n::t('Advanced Content Filter'),
@ -234,7 +235,7 @@ function advancedcontentfilter_content(App $a)
],
'$current_theme' => $a->getCurrentTheme(),
'$rules' => advancedcontentfilter_get_rules(),
'$form_security_token' => get_form_security_token()
'$form_security_token' => BaseModule::getFormSecurityToken()
]);
}
}
@ -322,7 +323,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -356,7 +357,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -385,7 +386,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}

View file

@ -5,7 +5,7 @@
"authors": [
{
"name": "Hypolite Petovan",
"email": "mrpetovan@gmail.com",
"email": "hypolite@mrpetovan.com",
"homepage": "https://friendica.mrpetovan.com/profile/hypolite",
"role": "Developer"
}

View file

@ -0,0 +1,167 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
# Translators:
# Marie Olive <lacellule101@gmail.com>, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-17 04:04+0200\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: advancedcontentfilter.php:134
#, php-format
msgid "Filtered by rule: %s"
msgstr "Filtrer par règle:%s"
#: advancedcontentfilter.php:147 advancedcontentfilter.php:204
msgid "Advanced Content Filter"
msgstr "Filtre avancé de contenu"
#: advancedcontentfilter.php:203
msgid "Back to Addon Settings"
msgstr "Retour aux paramètres de l'extension"
#: advancedcontentfilter.php:205
msgid "Add a Rule"
msgstr "Ajouter une règle"
#: advancedcontentfilter.php:206
msgid "Help"
msgstr "Aide"
#: advancedcontentfilter.php:207
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the <a href=\"advancedcontentfilter/help\">help page</a>."
msgstr ""
#: advancedcontentfilter.php:208
msgid "Your rules"
msgstr "Vos règles"
#: advancedcontentfilter.php:209
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:210
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:211
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:212
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:213
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:214
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:215
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:216
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:217
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:218
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:219
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:220
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:221
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:222
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:223
msgid ""
"<p>Examples:</p><ul><li><pre>author_link == "
"'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:290 advancedcontentfilter.php:301
#: advancedcontentfilter.php:312 advancedcontentfilter.php:346
#: advancedcontentfilter.php:375 advancedcontentfilter.php:396
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:316 advancedcontentfilter.php:350
#: advancedcontentfilter.php:379
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:328
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:340
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:354 advancedcontentfilter.php:383
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:369
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:390
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:400
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:406
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:28
msgid "Method not found"
msgstr ""

View file

@ -0,0 +1,41 @@
<?php
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["Filtered by rule: %s"] = "Filtrer par règle:%s";
$a->strings["Advanced Content Filter"] = "Filtre avancé de contenu";
$a->strings["Back to Addon Settings"] = "Retour aux paramètres de l'extension";
$a->strings["Add a Rule"] = "Ajouter une règle";
$a->strings["Help"] = "Aide";
$a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the <a href=\"advancedcontentfilter/help\">help page</a>."] = "";
$a->strings["Your rules"] = "Vos règles";
$a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = "";
$a->strings["Disabled"] = "";
$a->strings["Enabled"] = "";
$a->strings["Disable this rule"] = "";
$a->strings["Enable this rule"] = "";
$a->strings["Edit this rule"] = "";
$a->strings["Edit the rule"] = "";
$a->strings["Save this rule"] = "";
$a->strings["Delete this rule"] = "";
$a->strings["Rule"] = "";
$a->strings["Close"] = "";
$a->strings["Add new rule"] = "";
$a->strings["Rule Name"] = "";
$a->strings["Rule Expression"] = "";
$a->strings["<p>Examples:</p><ul><li><pre>author_link == 'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"] = "";
$a->strings["Cancel"] = "";
$a->strings["You must be logged in to use this method"] = "";
$a->strings["Invalid form security token, please refresh the page."] = "";
$a->strings["The rule name and expression are required."] = "";
$a->strings["Rule successfully added"] = "";
$a->strings["Rule doesn't exist or doesn't belong to you."] = "";
$a->strings["Rule successfully updated"] = "";
$a->strings["Rule successfully deleted"] = "";
$a->strings["Missing argument: guid."] = "";
$a->strings["Unknown post with guid: %s"] = "";
$a->strings["Method not found"] = "";

View file

@ -1,4 +1,5 @@
<?php
use Friendica\Core\L10n;
$container = $slim->getContainer();

View file

@ -52,6 +52,8 @@
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
function blackout_install() {
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
@ -84,8 +86,8 @@ function blackout_redirect ($a, $b) {
$date2 = 0;
}
if (( $date1 <= $now ) && ( $now <= $date2 )) {
logger('redirecting user to blackout page');
goaway($myurl);
Logger::log('redirecting user to blackout page');
System::externalRedirect($myurl);
}
}
@ -96,9 +98,9 @@ function blackout_addon_admin(&$a, &$o) {
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
$myurl = Config::get('blackout','url');
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
$t = get_markup_template( "admin.tpl", "addon/blackout/" );
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" );
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$rurl' => ["rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"],
'$startdate' => ["startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"],

View file

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-07-02 15:28+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-02 17:54+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: blackout.php:99
msgid "Save Settings"
msgstr "Uložit Nastavení"
msgstr "Uložit nastavení"
#: blackout.php:100
msgid "Redirect URL"
@ -49,4 +50,4 @@ msgstr "Konec odstávky"
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr "Datum konce odstávky je před datem zahájení odstávky prosím opravte to."
msgstr "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to."

View file

@ -2,13 +2,14 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Save Settings"] = "Uložit Nastavení";
$a->strings["Save Settings"] = "Uložit nastavení";
$a->strings["Redirect URL"] = "URL Přesměrování";
$a->strings["all your visitors from the web will be redirected to this URL"] = "všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu";
$a->strings["Begin of the Blackout"] = "Zahájení odstávky";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "formát je <em>RRRR</em> rok, <em>MM</em> měsíc, <em>DD</em> den, <em>hh</em> hodina a <em>mm</em> minuta";
$a->strings["End of the Blackout"] = "Konec odstávky";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky prosím opravte to.";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to.";

View file

@ -5,14 +5,14 @@
#
# Translators:
# Damien Goutte-Gattat <damien+transifex@incenp.org>, 2015
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2016-09-24 02:13+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View file

@ -4,14 +4,15 @@
#
#
# Translators:
# Jonatan Nyberg <jonatan@autistici.org>, 2017
# Jonatan Nyberg, 2017
# Tim Stahel <transifex@swedneck.xyz>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2017-02-13 20:15+0000\n"
"Last-Translator: Jonatan Nyberg <jonatan@autistici.org>\n"
"PO-Revision-Date: 2018-11-13 12:35+0000\n"
"Last-Translator: Tim Stahel <transifex@swedneck.xyz>\n"
"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,28 +26,28 @@ msgstr "Spara inställningar"
#: blackout.php:100
msgid "Redirect URL"
msgstr ""
msgstr "Omdirigera URL"
#: blackout.php:100
msgid "all your visitors from the web will be redirected to this URL"
msgstr ""
msgstr "alla dina besökare från webben kommer omdirigeras till denna URL"
#: blackout.php:101
msgid "Begin of the Blackout"
msgstr ""
msgstr "Start av blackouten"
#: blackout.php:101
msgid ""
"format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, "
"<em>hh</em> hour and <em>mm</em> minute"
msgstr ""
msgstr "format är <em>ÅÅÅÅ</em> år, <em>MM</em> månad, <em>DD</em> dag, <em>hh</em> timma och <em>mm</em> minut"
#: blackout.php:102
msgid "End of the Blackout"
msgstr ""
msgstr "Slut av blackouten"
#: blackout.php:108
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
msgstr "Slutdatumet är före startdatumet för blackouten, du borde fixa detta."

View file

@ -2,13 +2,14 @@
if(! function_exists("string_plural_select_sv")) {
function string_plural_select_sv($n){
$n = intval($n);
return ($n != 1);;
}}
;
$a->strings["Save Settings"] = "Spara inställningar";
$a->strings["Redirect URL"] = "";
$a->strings["all your visitors from the web will be redirected to this URL"] = "";
$a->strings["Begin of the Blackout"] = "";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "";
$a->strings["End of the Blackout"] = "";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "";
$a->strings["Redirect URL"] = "Omdirigera URL";
$a->strings["all your visitors from the web will be redirected to this URL"] = "alla dina besökare från webben kommer omdirigeras till denna URL";
$a->strings["Begin of the Blackout"] = "Start av blackouten";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "format är <em>ÅÅÅÅ</em> år, <em>MM</em> månad, <em>DD</em> dag, <em>hh</em> timma och <em>mm</em> minut";
$a->strings["End of the Blackout"] = "Slut av blackouten";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Slutdatumet är före startdatumet för blackouten, du borde fixa detta.";

View file

@ -11,6 +11,7 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function blockem_install()
{
@ -42,7 +43,7 @@ function blockem_addon_settings (App $a, &$s)
}
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
$words = PConfig::get(local_user(), 'blockem', 'words');
@ -100,7 +101,7 @@ function blockem_enotify_store(App $a, array &$b)
continue;
}
if (link_compare($b['url'], $word)) {
if (Strings::compareLink($b['url'], $word)) {
$found = true;
break;
}
@ -133,7 +134,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
$found = false;
foreach ($profiles_array as $word) {
if (link_compare($hook_data['item']['author-link'], trim($word))) {
if (Strings::compareLink($hook_data['item']['author-link'], trim($word))) {
$found = true;
break;
}
@ -147,7 +148,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
function blockem_display_item(App $a, array &$b = null)
{
if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) {
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
$b['output']['thumb'] = $a->getBaseURL() . "/images/person-80.jpg";
}
}
@ -192,7 +193,7 @@ function blockem_item_photo_menu(App $a, array &$b)
if (!empty($a->data['blockem'])) {
foreach($a->data['blockem'] as $bloke) {
if (link_compare($bloke,$author)) {
if (Strings::compareLink($bloke,$author)) {
$blocked = true;
break;
}
@ -231,7 +232,7 @@ function blockem_init(App $a)
if (count($arr)) {
foreach ($arr as $x) {
if (!link_compare(trim($x), trim($_GET['unblock']))) {
if (!Strings::compareLink(trim($x), trim($_GET['unblock']))) {
$newarr[] = $x;
}
}

View file

@ -0,0 +1,61 @@
# ADDON blockem
# Copyright (C)
# This file is distributed under the same license as the Friendica blockem addon package.
#
#
# Translators:
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-17 10:23+0200\n"
"PO-Revision-Date: 2018-11-13 12:55+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: blockem.php:54 blockem.php:58
msgid "Blockem"
msgstr "Blockem"
#: blockem.php:62
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Cache le contenu de l'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique."
#: blockem.php:63
msgid "Comma separated profile URLS:"
msgstr "URLs de profil séparées par des virgules:"
#: blockem.php:67
msgid "Save Settings"
msgstr "Sauvegarder les paramètres"
#: blockem.php:81
msgid "BLOCKEM Settings saved."
msgstr "Paramètres Blockem sauvegardés."
#: blockem.php:143
#, php-format
msgid "Filtered user: %s"
msgstr "Utilisateur filtré:%s"
#: blockem.php:202
msgid "Unblock Author"
msgstr "Débloquer l'Auteur"
#: blockem.php:204
msgid "Block Author"
msgstr "Bloquer l'Auteur"
#: blockem.php:244
msgid "blockem settings updated"
msgstr "Réglages Blockem mis à jour."

View file

@ -1,10 +1,2 @@
<?php
$a->strings["\"Blockem\" Settings"] = "Réglages de Blockem";
$a->strings["Comma separated profile URLS to block"] = "Liste d'URLS de profils à bloquer, séparés par des virgules";
$a->strings["Submit"] = "Envoyer";
$a->strings["BLOCKEM Settings saved."] = "Réglages Blockem sauvés.";
$a->strings["Blocked %s - Click to open/close"] = "Bloqué %s - Cliquez pour ouvrir/fermer";
$a->strings["Unblock Author"] = "Débloquer l'auteur";
$a->strings["Block Author"] = "Bloquer l'auteur";
$a->strings["blockem settings updated"] = "Réglages blockem sauvés";
<?php

View file

@ -10,11 +10,14 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
use Friendica\Util\XML;
function blogger_install()
{
Addon::registerHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
@ -24,6 +27,7 @@ function blogger_install()
function blogger_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
@ -62,7 +66,7 @@ function blogger_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -120,14 +124,29 @@ function blogger_settings(App $a, &$s)
function blogger_settings_post(App $a, array &$b)
{
if (!empty($_POST['blogger-submit'])) {
PConfig::set(local_user(), 'blogger', 'post', intval($_POST['blogger']));
PConfig::set(local_user(), 'blogger', 'post_by_default', intval($_POST['bl_bydefault']));
PConfig::set(local_user(), 'blogger', 'post', defaults($_POST, 'blogger', false));
PConfig::set(local_user(), 'blogger', 'post_by_default', defaults($_POST, 'bl_bydefault', false));
PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
}
}
function blogger_hook_fork(App &$a, array &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'blogger') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function blogger_post_local(App $a, array &$b)
{
// This can probably be changed to allow editing by pointing to a different API endpoint
@ -146,7 +165,7 @@ function blogger_post_local(App $a, array &$b)
$bl_post = intval(PConfig::get(local_user(), 'blogger', 'post'));
$bl_enable = (($bl_post && x($_REQUEST, 'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
$bl_enable = (($bl_post && !empty($_REQUEST['blogger_enable'])) ? intval($_REQUEST['blogger_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(), 'blogger', 'post_by_default'))) {
$bl_enable = 1;
@ -177,14 +196,14 @@ function blogger_send(App $a, array &$b)
return;
}
$bl_username = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_username'));
$bl_password = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_password'));
$bl_username = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_username'));
$bl_password = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_password'));
$bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog');
if ($bl_username && $bl_password && $bl_blog) {
$title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
$post = $title . BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$xml = <<< EOT
<?xml version=\"1.0\" encoding=\"utf-8\"?>
@ -202,12 +221,12 @@ function blogger_send(App $a, array &$b)
EOT;
logger('blogger: data: ' . $xml, LOGGER_DATA);
Logger::log('blogger: data: ' . $xml, Logger::DATA);
if ($bl_blog !== 'test') {
$x = Network::post($bl_blog, $xml);
$x = Network::post($bl_blog, $xml)->getBody();
}
logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);
Logger::log('posted to blogger: ' . (($x) ? $x : ''), Logger::DEBUG);
}
}

View file

@ -4,14 +4,16 @@
#
#
# Translators:
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2015-08-30 17:07+0000\n"
"Last-Translator: Nicola Spanti <translations@nicola-spanti.info>\n"
"PO-Revision-Date: 2018-11-13 12:44+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,11 +27,11 @@ msgstr "Poster sur Blogger"
#: blogger.php:74 blogger.php:78
msgid "Blogger Export"
msgstr ""
msgstr "Export Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Addon"
msgstr "Activer le connecteur Blogger"
msgstr "Activer l'extension de publication Blogger"
#: blogger.php:87
msgid "Blogger username"
@ -45,7 +47,7 @@ msgstr "URL de l'API de Blogger"
#: blogger.php:102
msgid "Post to Blogger by default"
msgstr ""
msgstr "Poster sur Blogger par défaut"
#: blogger.php:108
msgid "Save Settings"
@ -53,4 +55,4 @@ msgstr "Sauvegarder les paramètres"
#: blogger.php:178
msgid "Post from Friendica"
msgstr ""
msgstr "Publier depuis Friendica"

View file

@ -2,15 +2,16 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["Post to blogger"] = "Poster sur Blogger";
$a->strings["Blogger Export"] = "";
$a->strings["Enable Blogger Post Addon"] = "Activer le connecteur Blogger";
$a->strings["Blogger Export"] = "Export Blogger";
$a->strings["Enable Blogger Post Addon"] = "Activer l'extension de publication Blogger";
$a->strings["Blogger username"] = "Nom d'utilisateur Blogger";
$a->strings["Blogger password"] = "Mot de passe Blogger";
$a->strings["Blogger API URL"] = "URL de l'API de Blogger";
$a->strings["Post to Blogger by default"] = "";
$a->strings["Post to Blogger by default"] = "Poster sur Blogger par défaut";
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
$a->strings["Post from Friendica"] = "";
$a->strings["Post from Friendica"] = "Publier depuis Friendica";

View file

@ -12,14 +12,18 @@ use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Model\ItemContent;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
function buffer_install()
{
Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
@ -29,6 +33,7 @@ function buffer_install()
function buffer_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
@ -69,9 +74,9 @@ function buffer_content(App $a)
function buffer_addon_admin(App $a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/buffer/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/buffer/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
// name, label, value, help, [extra values]
'$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''],
@ -81,8 +86,8 @@ function buffer_addon_admin(App $a, &$o)
function buffer_addon_admin_post(App $a)
{
$client_id = ((!empty($_POST['client_id'])) ? notags(trim($_POST['client_id'])) : '');
$client_secret = ((!empty($_POST['client_secret'])) ? notags(trim($_POST['client_secret'])) : '');
$client_id = (!empty($_POST['client_id']) ? Strings::escapeTags(trim($_POST['client_id'])) : '');
$client_secret = (!empty($_POST['client_secret']) ? Strings::escapeTags(trim($_POST['client_secret'])) : '');
Config::set('buffer', 'client_id' , $client_id);
Config::set('buffer', 'client_secret', $client_secret);
@ -105,16 +110,16 @@ function buffer_connect(App $a)
$client_secret = Config::get('buffer','client_secret');
// The callback URL is the script that gets called after the user authenticates with buffer
$callback_url = $a->get_baseurl()."/buffer/connect";
$callback_url = $a->getBaseURL()."/buffer/connect";
$buffer = new BufferApp($client_id, $client_secret, $callback_url);
if (!$buffer->ok) {
$o .= '<a href="' . $buffer->get_login_url() . '">Connect to Buffer!</a>';
} else {
logger("buffer_connect: authenticated");
Logger::log("buffer_connect: authenticated");
$o .= L10n::t("You are now authenticated to buffer. ");
$o .= '<br /><a href="' . $a->get_baseurl() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
$o .= '<br /><a href="' . $a->getBaseURL() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
}
@ -145,7 +150,7 @@ function buffer_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -174,7 +179,7 @@ function buffer_settings(App $a, &$s)
if ($access_token == "") {
$s .= '<div id="buffer-authenticate-wrapper">';
$s .= '<a href="'.$a->get_baseurl().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '<a href="'.$a->getBaseURL().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '</div><div class="clear"></div>';
} else {
$s .= '<div id="buffer-enable-wrapper">';
@ -193,7 +198,7 @@ function buffer_settings(App $a, &$s)
$s .= '</div><div class="clear"></div>';
// The callback URL is the script that gets called after the user authenticates with buffer
$callback_url = $a->get_baseurl() . '/buffer/connect';
$callback_url = $a->getBaseURL() . '/buffer/connect';
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
@ -263,6 +268,21 @@ function buffer_post_local(App $a, array &$b)
$b['postopts'] .= 'buffer';
}
function buffer_hook_fork(&$a, &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'buffer') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function buffer_send(App $a, array &$b)
{
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
@ -298,7 +318,7 @@ function buffer_send(App $a, array &$b)
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
logger("Will send these parameter ".print_r($b, true), LOGGER_DEBUG);
Logger::log("Will send these parameter ".print_r($b, true), Logger::DEBUG);
foreach ($profiles as $profile) {
if (!$profile->default)
@ -357,7 +377,7 @@ function buffer_send(App $a, array &$b)
}
$post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode);
logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG);
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
if (isset($post["image"])) {
@ -407,9 +427,9 @@ function buffer_send(App $a, array &$b)
}
//print_r($message);
logger("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), LOGGER_DEBUG);
Logger::log("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), Logger::DEBUG);
$ret = $buffer->go('/updates/create', $message);
logger("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), LOGGER_DEBUG);
Logger::log("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), Logger::DEBUG);
}
}
}

View file

@ -45,6 +45,7 @@
'403' => 'Permission denied.',
'404' => 'Endpoint not found.',
'405' => 'Method not allowed.',
'504' => 'Gateway timeout server response timeout.',
'1000' => 'An unknown error occurred.',
'1001' => 'Access token required.',
'1002' => 'Not within application scope.',

View file

@ -4,15 +4,16 @@
#
#
# Translators:
# Lorem Ipsum <aditoo@seznam.cz>, 2018
# Aditoo, 2018
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2018-06-09 09:15+0000\n"
"Last-Translator: Lorem Ipsum <aditoo@seznam.cz>\n"
"PO-Revision-Date: 2018-09-12 09:43+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -38,19 +39,19 @@ msgstr "Client Secret"
#: buffer.php:67
msgid "Error when registering buffer connection:"
msgstr "Chyba při registraci buffer spojená"
msgstr "Chyba při registraci připojení na buffer:"
#: buffer.php:86
msgid "You are now authenticated to buffer. "
msgstr "Nyní jste přihlášen k bufferu."
msgstr "Nyní jste přihlášen/a na buffer."
#: buffer.php:87
msgid "return to the connector page"
msgstr "návrat ke stránce konektor"
msgstr "zpět ke stránce konektoru"
#: buffer.php:103
msgid "Post to Buffer"
msgstr "Příspěvek na Buffer"
msgstr "Posílat na Buffer"
#: buffer.php:128 buffer.php:132
msgid "Buffer Export"
@ -58,7 +59,7 @@ msgstr "Buffer Export"
#: buffer.php:142
msgid "Authenticate your Buffer connection"
msgstr "Přihlásit ke spojení na Buffer"
msgstr "Autentikujte své připojení na Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Addon"
@ -66,12 +67,12 @@ msgstr "Povolit doplněk Buffer Post"
#: buffer.php:151
msgid "Post to Buffer by default"
msgstr "Defaultně zaslat na Buffer"
msgstr "Ve výchozím stavu posílat na Buffer"
#: buffer.php:156
msgid "Check to delete this preset"
msgstr "Zaškrtnout pro smazání tohoto nastavení"
msgstr "Zaškrtnutím smažete toto nastavení"
#: buffer.php:165
msgid "Posts are going to all accounts that are enabled by default:"
msgstr "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:"
msgstr "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:"

View file

@ -10,13 +10,13 @@ $a->strings["Permission denied."] = "Přístup odmítnut.";
$a->strings["Save Settings"] = "Uložit Nastavení";
$a->strings["Client ID"] = "Client ID";
$a->strings["Client Secret"] = "Client Secret";
$a->strings["Error when registering buffer connection:"] = "Chyba při registraci buffer spojená";
$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen k bufferu.";
$a->strings["return to the connector page"] = "návrat ke stránce konektor";
$a->strings["Post to Buffer"] = "Příspěvek na Buffer";
$a->strings["Error when registering buffer connection:"] = "Chyba při registraci připojení na buffer:";
$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen/a na buffer.";
$a->strings["return to the connector page"] = "zpět ke stránce konektoru";
$a->strings["Post to Buffer"] = "Posílat na Buffer";
$a->strings["Buffer Export"] = "Buffer Export";
$a->strings["Authenticate your Buffer connection"] = "Přihlásit ke spojení na Buffer";
$a->strings["Authenticate your Buffer connection"] = "Autentikujte své připojení na Buffer";
$a->strings["Enable Buffer Post Addon"] = "Povolit doplněk Buffer Post";
$a->strings["Post to Buffer by default"] = "Defaultně zaslat na Buffer";
$a->strings["Check to delete this preset"] = "Zaškrtnout pro smazání tohoto nastavení";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:";
$a->strings["Post to Buffer by default"] = "Ve výchozím stavu posílat na Buffer";
$a->strings["Check to delete this preset"] = "Zaškrtnutím smažete toto nastavení";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:";

View file

@ -4,16 +4,17 @@
#
#
# Translators:
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2016-09-24 03:03+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"PO-Revision-Date: 2018-11-13 12:56+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -63,7 +64,7 @@ msgstr "Authentifier votre connexion à Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Addon"
msgstr "Activer le connecteur Buffer"
msgstr "Activer l'extension de publication Buffer"
#: buffer.php:151
msgid "Post to Buffer by default"

View file

@ -2,6 +2,7 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
@ -15,7 +16,7 @@ $a->strings["return to the connector page"] = "revenir à la page du connecteur"
$a->strings["Post to Buffer"] = "Publier sur Buffer";
$a->strings["Buffer Export"] = "Export Buffer";
$a->strings["Authenticate your Buffer connection"] = "Authentifier votre connexion à Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activer le connecteur Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activer l'extension de publication Buffer";
$a->strings["Post to Buffer by default"] = "Publier sur Buffer par défaut";
$a->strings["Check to delete this preset"] = "Cocher pour supprimer ce préréglage";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Les posts sont envoyés à tous les comptes activés par défault:";

View file

@ -10,7 +10,9 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
@ -28,7 +30,7 @@ function catavatar_install()
Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
logger('registered catavatar');
Logger::log('registered catavatar');
}
/**
@ -40,7 +42,7 @@ function catavatar_uninstall()
Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
logger('unregistered catavatar');
Logger::log('unregistered catavatar');
}
/**
@ -52,8 +54,8 @@ function catavatar_addon_settings(App $a, &$s)
return;
}
$t = get_markup_template('settings.tpl', 'addon/catavatar/');
$s .= replace_macros ($t, [
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
$s .= Renderer::replaceMacros($t, [
'$postpost' => !empty($_POST['catavatar-morecat']) || !empty($_POST['catavatar-emailcat']),
'$uncache' => time(),
'$uid' => local_user(),
@ -82,7 +84,7 @@ function catavatar_addon_settings_post(App $a, &$s)
$seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email']))));
if (!empty($_POST['catavatar-usecat'])) {
$url = $a->get_baseurl() . '/catavatar/' . local_user() . '?ts=' . time();
$url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time();
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
@ -109,7 +111,7 @@ function catavatar_addon_settings_post(App $a, &$s)
Contact::updateSelfFromUserID(local_user(), true);
// Update global directory in background
$url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
$url = $a->getBaseURL() . '/profile/' . $a->user['nickname'];
if ($url && strlen(Config::get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, 'Directory', $url);
}
@ -138,10 +140,10 @@ function catavatar_addon_settings_post(App $a, &$s)
function catavatar_lookup(App $a, &$b)
{
$user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]);
$url = $a->get_baseurl() . '/catavatar/' . $user['uid'];
$url = $a->getBaseURL() . '/catavatar/' . $user['uid'];
switch($b['size']) {
case 175: $url .= "/4"; break;
case 300: $url .= "/4"; break;
case 80: $url .= "/5"; break;
case 47: $url .= "/6"; break;
}
@ -171,7 +173,7 @@ function catavatar_content(App $a)
$size = intval($a->argv[2]);
}
$condition = ['uid' => $uid, 'blocked' => false,
$condition = ['uid' => $uid,
'account_expired' => false, 'account_removed' => false];
$user = DBA::selectFirst('user', ['email'], $condition);
@ -245,7 +247,7 @@ function build_cat($seed = '', $size = 0)
if ($size > 3 && $size < 7) {
switch ($size) {
case 4:
$size = 175;
$size = 300;
break;
case 5:
$size = 80;

View file

@ -17,6 +17,7 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
@ -92,7 +93,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
];
PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR);
Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
return $r;
}
@ -103,7 +104,7 @@ function curweather_network_mod_init(App $a, &$b)
return;
}
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
// $rpt value is needed for location
// $lang will be taken from the browser session to honour user settings
@ -117,7 +118,7 @@ function curweather_network_mod_init(App $a, &$b)
$rpt = PConfig::get(local_user(), 'curweather', 'curweather_loc');
// Set the language to the browsers language or default and use metric units
$lang = (!empty($_SESSION['language']) ? $_SESSION['language'] : Config::get('system', 'language'));
$lang = defaults($_SESSION, 'language', Config::get('system', 'language'));
$units = PConfig::get( local_user(), 'curweather', 'curweather_units');
$appid = Config::get('curweather', 'appid');
$cachetime = intval(Config::get('curweather', 'cachetime'));
@ -135,8 +136,8 @@ function curweather_network_mod_init(App $a, &$b)
}
if ($ok) {
$t = get_markup_template("widget.tpl", "addon/curweather/" );
$curweather = replace_macros ($t, [
$t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" );
$curweather = Renderer::replaceMacros($t, [
'$title' => L10n::t("Current Weather"),
'$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
'$city' => $res['city'],
@ -152,8 +153,8 @@ function curweather_network_mod_init(App $a, &$b)
'$showonmap' => L10n::t('Show on map')
]);
} else {
$t = get_markup_template('widget-error.tpl', 'addon/curweather/');
$curweather = replace_macros( $t, [
$t = Renderer::getMarkupTemplate('widget-error.tpl', 'addon/curweather/');
$curweather = Renderer::replaceMacros( $t, [
'$problem' => L10n::t('There was a problem accessing the weather data. But have a look'),
'$rpt' => $rpt,
'$atOWM' => L10n::t('at OpenWeatherMap')
@ -197,9 +198,9 @@ function curweather_addon_settings(App $a, &$s)
$enable_checked = (($enable) ? ' checked="checked" ' : '');
// load template and replace the macros
$t = get_markup_template("settings.tpl", "addon/curweather/" );
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/curweather/" );
$s = replace_macros ($t, [
$s = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$header' => L10n::t('Current Weather').' '.L10n::t('Settings'),
'$noappidtext' => $noappidtext,
@ -237,9 +238,9 @@ function curweather_addon_admin(App $a, &$o)
$appid = Config::get('curweather', 'appid');
$cachetime = Config::get('curweather', 'cachetime');
$t = get_markup_template("admin.tpl", "addon/curweather/" );
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/curweather/" );
$o = replace_macros ($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$cachetime' => [
'cachetime',

View file

@ -4,7 +4,7 @@
#
#
# Translators:
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 08:10+0100\n"
"PO-Revision-Date: 2016-09-24 03:15+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View file

@ -136,7 +136,7 @@ class Diaspora_Connection {
} elseif (!empty($m[1])) {
$token = $m[1];
}
return (!empty($token)) ? $token : false;
return !empty($token) ? $token : false;
}
private function readJsonResponse($response) {
@ -165,14 +165,14 @@ class Diaspora_Connection {
$this->doHttpRequest('/bookmarklet');
$m = [];
preg_match('/"aspects"\:(\[.+?\])/', $this->last_http_result->response, $m);
return (!empty($m[1])) ? json_decode($m[1]) : false;
return !empty($m[1]) ? json_decode($m[1]) : false;
}
public function getServices() {
$this->doHttpRequest('/bookmarklet');
$m = [];
preg_match('/"configured_services"\:(\[.+?\])/', $this->last_http_result->response, $m);
return (!empty($m[1])) ? json_decode($m[1]) : false;
return !empty($m[1]) ? json_decode($m[1]) : false;
}
public function getNotifications($notification_type = '', $show = '') {

View file

@ -13,6 +13,7 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
@ -20,6 +21,7 @@ use Friendica\Model\Queue;
function diaspora_install()
{
Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
@ -30,6 +32,7 @@ function diaspora_install()
function diaspora_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
@ -57,7 +60,7 @@ function diaspora_jot_nets(App $a, &$b)
}
function diaspora_queue_hook(App $a, &$b) {
$hostname = $a->get_hostname();
$hostname = $a->getHostName();
$qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
DBA::escape(Protocol::DIASPORA2)
@ -72,7 +75,7 @@ function diaspora_queue_hook(App $a, &$b) {
continue;
}
logger('diaspora_queue: run');
Logger::log('diaspora_queue: run');
$r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1",
@ -92,37 +95,37 @@ function diaspora_queue_hook(App $a, &$b) {
$success = false;
if ($handle && $password) {
logger('diaspora_queue: able to post for user '.$handle);
Logger::log('diaspora_queue: able to post for user '.$handle);
$z = unserialize($x['content']);
$post = $z['post'];
logger('diaspora_queue: post: '.$post, LOGGER_DATA);
Logger::log('diaspora_queue: post: '.$post, Logger::DATA);
try {
logger('diaspora_queue: prepare', LOGGER_DEBUG);
Logger::log('diaspora_queue: prepare', Logger::DEBUG);
$conn = new Diaspora_Connection($handle, $password);
logger('diaspora_queue: try to log in '.$handle, LOGGER_DEBUG);
Logger::log('diaspora_queue: try to log in '.$handle, Logger::DEBUG);
$conn->logIn();
logger('diaspora_queue: try to send '.$body, LOGGER_DEBUG);
Logger::log('diaspora_queue: try to send '.$body, Logger::DEBUG);
$conn->provider = $hostname;
$conn->postStatusMessage($post, $aspect);
logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG);
Logger::log('diaspora_queue: send '.$userdata['uid'].' success', Logger::DEBUG);
$success = true;
Queue::removeItem($x['id']);
} catch (Exception $e) {
logger("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), LOGGER_DEBUG);
Logger::log("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), Logger::DEBUG);
}
} else {
logger('diaspora_queue: send '.$userdata['uid'].' missing username or password', LOGGER_DEBUG);
Logger::log('diaspora_queue: send '.$userdata['uid'].' missing username or password', Logger::DEBUG);
}
if (!$success) {
logger('diaspora_queue: delayed');
Logger::log('diaspora_queue: delayed');
Queue::updateTime($x['id']);
}
}
@ -136,7 +139,7 @@ function diaspora_settings(App $a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -252,6 +255,21 @@ function diaspora_settings_post(App $a, &$b)
}
}
function diaspora_hook_fork(&$a, &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function diaspora_post_local(App $a, array &$b)
{
if ($b['edit']) {
@ -268,7 +286,7 @@ function diaspora_post_local(App $a, array &$b)
$diaspora_post = intval(PConfig::get(local_user(),'diaspora','post'));
$diaspora_enable = (($diaspora_post && x($_REQUEST,'diaspora_enable')) ? intval($_REQUEST['diaspora_enable']) : 0);
$diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(),'diaspora','post_by_default'))) {
$diaspora_enable = 1;
@ -287,9 +305,9 @@ function diaspora_post_local(App $a, array &$b)
function diaspora_send(App $a, array &$b)
{
$hostname = $a->get_hostname();
$hostname = $a->getHostName();
logger('diaspora_send: invoked');
Logger::log('diaspora_send: invoked');
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
@ -311,14 +329,14 @@ function diaspora_send(App $a, array &$b)
return;
}
logger('diaspora_send: prepare posting', LOGGER_DEBUG);
Logger::log('diaspora_send: prepare posting', Logger::DEBUG);
$handle = PConfig::get($b['uid'],'diaspora','handle');
$password = PConfig::get($b['uid'],'diaspora','password');
$aspect = PConfig::get($b['uid'],'diaspora','aspect');
if ($handle && $password) {
logger('diaspora_send: all values seem to be okay', LOGGER_DEBUG);
Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG);
$tag_arr = [];
$tags = '';
@ -363,20 +381,20 @@ function diaspora_send(App $a, array &$b)
require_once "addon/diaspora/diasphp.php";
try {
logger('diaspora_send: prepare', LOGGER_DEBUG);
Logger::log('diaspora_send: prepare', Logger::DEBUG);
$conn = new Diaspora_Connection($handle, $password);
logger('diaspora_send: try to log in '.$handle, LOGGER_DEBUG);
Logger::log('diaspora_send: try to log in '.$handle, Logger::DEBUG);
$conn->logIn();
logger('diaspora_send: try to send '.$body, LOGGER_DEBUG);
Logger::log('diaspora_send: try to send '.$body, Logger::DEBUG);
$conn->provider = $hostname;
$conn->postStatusMessage($body, $aspect);
logger('diaspora_send: success');
Logger::log('diaspora_send: success');
} catch (Exception $e) {
logger("diaspora_send: Error submitting the post: " . $e->getMessage());
Logger::log("diaspora_send: Error submitting the post: " . $e->getMessage());
logger('diaspora_send: requeueing '.$b['uid'], LOGGER_DEBUG);
Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG);
$r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']);
if (count($r))

View file

@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2018-08-16 10:10+0000\n"
"PO-Revision-Date: 2018-09-02 17:54+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
@ -23,7 +23,7 @@ msgstr ""
#: diaspora.php:37
msgid "Post to Diaspora"
msgstr "Odeslat příspěvek na Diasporu"
msgstr "Odeslat na Diasporu"
#: diaspora.php:142
msgid ""

View file

@ -6,7 +6,7 @@ function string_plural_select_cs($n){
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Post to Diaspora"] = "Odeslat příspěvek na Diasporu";
$a->strings["Post to Diaspora"] = "Odeslat na Diasporu";
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nelze se přihlásit na váš účet Diaspora. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)";
$a->strings["Diaspora Export"] = "Diaspora export";
$a->strings["Enable Diaspora Post Addon"] = "Povolit doplněk Diaspora Post";

View file

@ -12,10 +12,12 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Database\DBA;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
function dwpost_install()
{
@ -60,7 +62,7 @@ function dwpost_settings(App $a, &$s)
}
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'dwpost', 'post');
@ -135,7 +137,7 @@ function dwpost_post_local(App $a, array &$b)
$dw_post = intval(PConfig::get(local_user(),'dwpost','post'));
$dw_enable = (($dw_post && x($_REQUEST,'dwpost_enable')) ? intval($_REQUEST['dwpost_enable']) : 0);
$dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) {
$dw_enable = 1;
@ -188,7 +190,7 @@ function dwpost_send(App $a, array &$b)
if ($dw_username && $dw_password && $dw_blog) {
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$tags = dwpost_get_tags($b['tag']);
$date = DateTimeFormat::convert($b['created'], $tz);
@ -225,13 +227,13 @@ function dwpost_send(App $a, array &$b)
EOT;
logger('dwpost: data: ' . $xml, LOGGER_DATA);
Logger::log('dwpost: data: ' . $xml, Logger::DATA);
if ($dw_blog !== 'test') {
$x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"]);
$x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"])->getBody();
}
logger('posted to dreamwidth: ' . ($x) ? $x : '', LOGGER_DEBUG);
Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
}
}

View file

@ -30,7 +30,7 @@ function fortunate_uninstall()
function fortunate_fetch(&$a, &$b)
{
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
. $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
. $a->getBaseURL() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
if (FORTUNATE_SERVER != 'hostname.com') {
$s = Network::fetchUrl('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand());

View file

@ -8,13 +8,16 @@
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
require_once 'boot.php';
@ -43,9 +46,7 @@ function forumdirectory_app_menu(App $a, array &$b)
function forumdirectory_init(App $a)
{
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/forumdirectory/forumdirectory.css" media="all" />';
$a->set_pager_itemspage(60);
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/forumdirectory/forumdirectory.css" media="all" />';
if (local_user()) {
$a->page['aside'] .= Widget::findPeople();
@ -72,12 +73,12 @@ function forumdirectory_content(App $a)
Nav::setSelected('directory');
if (!empty($a->data['search'])) {
$search = notags(trim($a->data['search']));
$search = Strings::escapeTags(trim($a->data['search']));
} else {
$search = ((!empty($_GET['search'])) ? notags(trim(rawurldecode($_GET['search']))) : '');
$search = (!empty($_GET['search']) ? Strings::escapeTags(trim(rawurldecode($_GET['search']))) : '');
}
$tpl = get_markup_template('directory_header.tpl');
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
$globaldir = '';
$gdirpath = Config::get('system', 'directory');
@ -88,7 +89,7 @@ function forumdirectory_content(App $a)
$admin = '';
$o .= replace_macros($tpl, [
$o .= Renderer::replaceMacros($tpl, [
'$search' => $search,
'$globaldir' => $globaldir,
'$desc' => L10n::t('Find on this site'),
@ -107,19 +108,22 @@ function forumdirectory_content(App $a)
$publish = Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ";
$total = 0;
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`"
. " WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra ");
if (DBA::isResult($r)) {
$a->set_pager_total($r[0]['total']);
$total = $r[0]['total'];
}
$pager = new Pager($a->query_string, 60);
$order = " ORDER BY `name` ASC ";
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`"
. " FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish"
. " AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra $order LIMIT %d , %d ",
intval($a->pager['start']),
intval($a->pager['itemspage'])
$pager->getStart(),
$pager->getItemsPerPage()
);
if (DBA::isResult($r)) {
@ -130,7 +134,7 @@ function forumdirectory_content(App $a)
}
foreach ($r as $rr) {
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$profile_link = $a->getBaseURL() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
@ -185,9 +189,9 @@ function forumdirectory_content(App $a)
$homepage = !empty($profile['homepage']) ? L10n::t('Homepage:') : false;
$about = !empty($profile['about']) ? L10n::t('About:') : false;
$tpl = get_markup_template('forumdirectory_item.tpl', 'addon/forumdirectory/');
$tpl = Renderer::getMarkupTemplate('forumdirectory_item.tpl', 'addon/forumdirectory/');
$entry = replace_macros($tpl, [
$entry = Renderer::replaceMacros($tpl, [
'$id' => $rr['id'],
'$profile_link' => $profile_link,
'$photo' => $rr[$photo],
@ -208,7 +212,7 @@ function forumdirectory_content(App $a)
}
$o .= "<div class=\"directory-end\" ></div>\r\n";
$o .= paginate($a);
$o .= $pager->renderFull($total);
} else {
info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL);
}

View file

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-07-07 18:45+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-11 19:04+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: forumdirectory.php:22
msgid "Forum Directory"
msgstr "Adresář Fór"
msgstr "Adresář fór"
#: forumdirectory.php:53
msgid "Public access denied."
@ -33,11 +34,11 @@ msgstr "Globální adresář"
#: forumdirectory.php:79
msgid "Find on this site"
msgstr "Nalézt na tomto webu"
msgstr "Nat na tomto webu"
#: forumdirectory.php:81
msgid "Finding: "
msgstr "Zjištění: "
msgstr "Hledání: "
#: forumdirectory.php:82
msgid "Site Directory"
@ -57,7 +58,7 @@ msgstr "Pohlaví: "
#: forumdirectory.php:156
msgid "Location:"
msgstr "Místo:"
msgstr "Poloha:"
#: forumdirectory.php:158
msgid "Gender:"
@ -65,11 +66,11 @@ msgstr "Pohlaví:"
#: forumdirectory.php:160
msgid "Status:"
msgstr "Status:"
msgstr "Stav:"
#: forumdirectory.php:162
msgid "Homepage:"
msgstr "Domá stránka:"
msgstr "Domovská stránka:"
#: forumdirectory.php:164
msgid "About:"

View file

@ -2,21 +2,22 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Forum Directory"] = "Adresář Fór";
$a->strings["Forum Directory"] = "Adresář fór";
$a->strings["Public access denied."] = "Veřejný přístup odepřen.";
$a->strings["Global Directory"] = "Globální adresář";
$a->strings["Find on this site"] = "Nalézt na tomto webu";
$a->strings["Finding: "] = "Zjištění: ";
$a->strings["Find on this site"] = "Nat na tomto webu";
$a->strings["Finding: "] = "Hledání: ";
$a->strings["Site Directory"] = "Adresář serveru";
$a->strings["Find"] = "Najít";
$a->strings["Age: "] = "Věk: ";
$a->strings["Gender: "] = "Pohlaví: ";
$a->strings["Location:"] = "Místo:";
$a->strings["Location:"] = "Poloha:";
$a->strings["Gender:"] = "Pohlaví:";
$a->strings["Status:"] = "Status:";
$a->strings["Homepage:"] = "Domá stránka:";
$a->strings["Status:"] = "Stav:";
$a->strings["Homepage:"] = "Domovská stránka:";
$a->strings["About:"] = "O mě:";
$a->strings["No entries (some entries may be hidden)."] = "Žádné záznamy (některé položky mohou být skryty).";

View file

@ -8,6 +8,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function fromapp_install()
@ -15,7 +16,7 @@ function fromapp_install()
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("installed fromapp");
Logger::log("installed fromapp");
}
@ -24,12 +25,12 @@ function fromapp_uninstall()
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("removed fromapp");
Logger::log("removed fromapp");
}
function fromapp_settings_post($a, $post)
{
if (!local_user() || (! x($_POST, 'fromapp-submit'))) {
if (!local_user() || empty($_POST['fromapp-submit'])) {
return;
}
@ -47,7 +48,7 @@ function fromapp_settings(&$a, &$s)
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -4,37 +4,38 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:41+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-11 19:01+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: fromapp.php:38
msgid "Fromapp settings updated."
msgstr "Fromapp nastavení aktualizováno."
msgstr "Nastavení FromApp aktualizována."
#: fromapp.php:64
msgid "FromApp Settings"
msgstr "FromApp nastavení"
msgstr "Nastavení FromApp"
#: fromapp.php:66
msgid ""
"The application name you would like to show your posts originating from."
msgstr "Jméno zdrojové aplikace"
msgstr "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků."
#: fromapp.php:70
msgid "Use this application name even if another application was used."
msgstr "Použij toto jméno aplikace i když byla použita jiná aplikace"
msgstr "Použít toto jméno aplikace, i když byla použita jiná aplikace"
#: fromapp.php:77
msgid "Submit"

View file

@ -2,11 +2,12 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Fromapp settings updated."] = "Fromapp nastavení aktualizováno.";
$a->strings["FromApp Settings"] = "FromApp nastavení";
$a->strings["The application name you would like to show your posts originating from."] = "Jméno zdrojové aplikace";
$a->strings["Use this application name even if another application was used."] = "Použij toto jméno aplikace i když byla použita jiná aplikace";
$a->strings["Fromapp settings updated."] = "Nastavení FromApp aktualizována.";
$a->strings["FromApp Settings"] = "Nastavení FromApp";
$a->strings["The application name you would like to show your posts originating from."] = "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků.";
$a->strings["Use this application name even if another application was used."] = "Použít toto jméno aplikace, i když byla použita jiná aplikace";
$a->strings["Submit"] = "Odeslat";

View file

@ -12,8 +12,10 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
@ -87,9 +89,9 @@ function fromgplus_addon_settings_post(&$a,&$b) {
if (!empty($_POST['fromgplus-submit'])) {
PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
$enable = (x($_POST,'fromgplus-enable') ? intval($_POST['fromgplus-enable']) : 0);
$enable = (!empty($_POST['fromgplus-enable']) ? intval($_POST['fromgplus-enable']) : 0);
PConfig::set(local_user(),'fromgplus','enable', $enable);
$keywords = (x($_POST, 'fromgplus-keywords') ? intval($_POST['fromgplus-keywords']) : 0);
$keywords = (!empty($_POST['fromgplus-keywords']) ? intval($_POST['fromgplus-keywords']) : 0);
PConfig::set(local_user(),'fromgplus', 'keywords', $keywords);
if (!$enable)
@ -101,9 +103,9 @@ function fromgplus_addon_settings_post(&$a,&$b) {
function fromgplus_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/fromgplus/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$key' => ['key', L10n::t('Key'), trim(Config::get('fromgplus', 'key')), ''],
]);
@ -111,7 +113,7 @@ function fromgplus_addon_admin(&$a, &$o)
function fromgplus_addon_admin_post(&$a)
{
$key = ((x($_POST, 'key')) ? trim($_POST['key']) : '');
$key = (!empty($_POST['key']) ? trim($_POST['key']) : '');
Config::set('fromgplus', 'key', $key);
info(L10n::t('Settings updated.'). EOL);
}
@ -126,25 +128,25 @@ function fromgplus_cron($a,$b) {
if($last) {
$next = $last + ($poll_interval * 60);
if($next > time()) {
logger('fromgplus: poll intervall not reached');
Logger::log('fromgplus: poll intervall not reached');
return;
}
}
logger('fromgplus: cron_start');
Logger::log('fromgplus: cron_start');
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fromgplus' AND `k` = 'enable' AND `v` = '1' ORDER BY RAND() ");
if(count($r)) {
foreach($r as $rr) {
$account = PConfig::get($rr['uid'],'fromgplus','account');
if ($account) {
logger('fromgplus: fetching for user '.$rr['uid']);
Logger::log('fromgplus: fetching for user '.$rr['uid']);
fromgplus_fetch($a, $rr['uid']);
}
}
}
logger('fromgplus: cron_end');
Logger::log('fromgplus: cron_end');
Config::set('fromgplus','last_poll', time());
}
@ -190,15 +192,15 @@ function fromgplus_post($a, $uid, $source, $body, $location, $coord, $id) {
$_REQUEST['coord'] = $coord;
if (($_REQUEST['title'] == "") && ($_REQUEST['body'] == "")) {
logger('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true));
Logger::log('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true));
return;
}
require_once('mod/item.php');
//print_r($_REQUEST);
logger('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true));
Logger::log('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true));
item_post($a);
logger('fromgplus: done for user '.$uid);
Logger::log('fromgplus: done for user '.$uid);
}
function fromgplus_html2bbcode($html) {
@ -472,7 +474,7 @@ function fromgplus_fetch($a, $uid) {
// Don't publish items that are too young
if (strtotime($item->published) > (time() - 3*60)) {
logger('fromgplus_fetch: item too new '.$item->published);
Logger::log('fromgplus_fetch: item too new '.$item->published);
continue;
}
@ -495,8 +497,9 @@ function fromgplus_fetch($a, $uid) {
case "note":
$post = fromgplus_html2bbcode($item->object->content);
if (is_array($item->object->attachments))
if (!empty($item->object->attachments)) {
$post .= fromgplus_handleattachments($a, $uid, $item, $item->object->content, false);
}
$coord = "";
$location = "";
@ -526,12 +529,12 @@ function fromgplus_fetch($a, $uid) {
if (function_exists("share_header"))
$post .= share_header($item->object->actor->displayName, $item->object->actor->url,
$item->object->actor->image->url, "",
DateTimeFormat::utc($item->object->published),$item->object->url);
DateTimeFormat::utc($item->published),$item->object->url);
else
$post .= "[share author='".str_replace("'", "&#039;",$item->object->actor->displayName).
"' profile='".$item->object->actor->url.
"' avatar='".$item->object->actor->image->url.
"' posted='".DateTimeFormat::utc($item->object->published).
"' posted='".DateTimeFormat::utc($item->published).
"' link='".$item->object->url."']";
$post .= fromgplus_html2bbcode($item->object->content);

View file

@ -9,7 +9,10 @@ use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Util\Network;
use Friendica\Util\Strings;
function geocoordinates_install()
{
@ -54,25 +57,25 @@ function geocoordinates_resolve_item(&$item)
$s = Network::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language);
if (!$s) {
logger("API could not be queried", LOGGER_DEBUG);
Logger::log("API could not be queried", Logger::DEBUG);
return;
}
$data = json_decode($s);
if ($data->status->code != "200") {
logger("API returned error ".$data->status->code." ".$data->status->message, LOGGER_DEBUG);
Logger::log("API returned error ".$data->status->code." ".$data->status->message, Logger::DEBUG);
return;
}
if (($data->total_results == 0) || (count($data->results) == 0)) {
logger("No results found for coordinates ".$item["coord"], LOGGER_DEBUG);
Logger::log("No results found for coordinates ".$item["coord"], Logger::DEBUG);
return;
}
$item["location"] = $data->results[0]->formatted;
logger("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], LOGGER_DEBUG);
Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG);
if ($item["location"] != "")
Cache::set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]);
@ -86,9 +89,9 @@ function geocoordinates_post_hook($a, &$item)
function geocoordinates_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/geocoordinates/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/geocoordinates/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
'$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
@ -97,10 +100,10 @@ function geocoordinates_addon_admin(&$a, &$o)
function geocoordinates_addon_admin_post(&$a)
{
$api_key = ((x($_POST, 'api_key')) ? notags(trim($_POST['api_key'])) : '');
$api_key = (!empty($_POST['api_key']) ? Strings::escapeTags(trim($_POST['api_key'])) : '');
Config::set('geocoordinates', 'api_key', $api_key);
$language = ((x($_POST, 'language')) ? notags(trim($_POST['language'])) : '');
$language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
Config::set('geocoordinates', 'language', $language);
info(L10n::t('Settings updated.'). EOL);
}

View file

@ -7,9 +7,10 @@ Use Geonames service to resolve nearest populated location for given latitude, l
## Installation
Pre-requisite: Register a username at geonames.org and set in config/addon.ini.php
Pre-requisite: Register a username at geonames.org and set in `config/addon.config.php`
[geonames]
username = your_username
'geonames' => [
'username' => 'your_username'
],
Also visit http://geonames.org/manageaccount and enable access to the free web services.

View file

@ -0,0 +1,12 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'geonames' => [
//username (String)
//The geonames.org API username
'username' => '',
],
];

View file

@ -1,12 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[geonames]
; username (String)
; The geonames.org API username
username =
INI;
//Keep this line

View file

@ -7,7 +7,7 @@
*
*
* Pre-requisite: Register a username at geonames.org
* and set in config/addon.ini.php
* and set in config/addon.config.php
*
* [geonames]
* username = your_username
@ -24,6 +24,7 @@
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
use Friendica\Util\XML;
@ -52,7 +53,7 @@ function geonames_install() {
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
logger("installed geonames");
Logger::log("installed geonames");
}
@ -72,12 +73,12 @@ function geonames_uninstall() {
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
logger("removed geonames");
Logger::log("removed geonames");
}
function geonames_load_config(\Friendica\App $a)
{
$a->loadConfigFile(__DIR__. '/config/geonames.ini.php');
$a->loadConfigFile(__DIR__. '/config/geonames.config.php');
}
function geonames_post_hook($a, &$item) {
@ -91,7 +92,7 @@ function geonames_post_hook($a, &$item) {
*
*/
logger('geonames invoked');
Logger::log('geonames invoked');
if(! local_user()) /* non-zero if this is a logged in user of this system */
return;
@ -132,7 +133,7 @@ function geonames_post_hook($a, &$item) {
$item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName;
// logger('geonames : ' . print_r($xml,true), LOGGER_DATA);
// Logger::log('geonames : ' . print_r($xml,true), Logger::DATA);
return;
}
@ -149,7 +150,7 @@ function geonames_post_hook($a, &$item) {
*/
function geonames_addon_admin_post($a,$post) {
if(! local_user() || (! x($_POST,'geonames-submit')))
if(! local_user() || empty($_POST['geonames-submit']))
return;
PConfig::set(local_user(),'geonames','enable',intval($_POST['geonames']));
@ -178,7 +179,7 @@ function geonames_addon_admin(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/geonames/geonames.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/geonames/geonames.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -9,6 +9,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function gnot_install() {
@ -17,7 +18,7 @@ function gnot_install() {
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("installed gnot");
Logger::log("installed gnot");
}
@ -28,7 +29,7 @@ function gnot_uninstall() {
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("removed gnot");
Logger::log("removed gnot");
}
@ -43,7 +44,7 @@ function gnot_uninstall() {
*/
function gnot_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'gnot-submit')))
if(! local_user() || empty($_POST['gnot-submit']))
return;
PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot']));
@ -67,7 +68,7 @@ function gnot_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/gnot/gnot.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/gnot/gnot.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -8,19 +8,20 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Logger;
function googlemaps_install()
{
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("installed googlemaps");
Logger::log("installed googlemaps");
}
function googlemaps_uninstall()
{
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("removed googlemaps");
Logger::log("removed googlemaps");
}
function googlemaps_location($a, &$item)

View file

@ -30,15 +30,19 @@ Gravatar lets users self-rate their images to be used at appropriate audiences.
See more information at [Gravatar][1].
## Alternative Configuration
Open the config/local.ini.php file and add "gravatar" to the list of activated addons:
Open the `config/local.config.php` file and add "gravatar" to the list of activated addons:
[system]
addon = ...,gravatar
'system' => [
...
'addon' => '...,gravatar'
...
]
You can add two configuration variables for the addon to the config/addon.ini.php file:
You can add two configuration variables for the addon to the `config/addon.config.php` file:
[gravatar]
default_avatar = identicon
rating = g
'gravatar' => [
'default_avatar' => 'identicon',
'rating' => 'g',
],
[1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information"

View file

@ -0,0 +1,28 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'gravatar' => [
// default_avatar (String)
// If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
// You can choose between these presets:
// - gravatar : default static Gravatar logo
// - mm : (mystery-man) a static image
// - identicon: a generated geometric pattern based on email hash
// - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
// - wavatar : faces with different features and backgrounds based on email hash
// - retro : 8-bit arcade-styled pixelated faces based on email hash
'default_avatar' => 'gravatar',
// rating (String)
// Gravatar lets users self-rate their images to be used at appropriate audiences.
// Choose which are appropriate for your friendica site:
// - g : suitable for display on all wesites with any audience type
// - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
// - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use
// - x : may contain hardcore sexual imagery or extremely disurbing violence
'rating' => 'g',
],
];

View file

@ -1,28 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[gravatar]
; default_avatar (String)
; If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
; You can choose between these presets:
; - gravatar : default static Gravatar logo
; - mm : (mystery-man) a static image
; - identicon: a generated geometric pattern based on email hash
; - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
; - wavatar : faces with different features and backgrounds based on email hash
; - retro : 8-bit arcade-styled pixelated faces based on email hash
default_avatar = gravatar
; rating (String)
; Gravatar lets users self-rate their images to be used at appropriate audiences.
; Choose which are appropriate for your friendica site:
; - g : suitable for display on all wesites with any audience type
; - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
; - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use
; - x : may contain hardcore sexual imagery or extremely disurbing violence
rating = g
INI;
//Keep this line

View file

@ -7,10 +7,15 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
* Installs the addon hook
@ -19,7 +24,7 @@ function gravatar_install() {
Addon::registerHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("registered gravatar in avatar_lookup hook");
Logger::log("registered gravatar in avatar_lookup hook");
}
/**
@ -29,12 +34,12 @@ function gravatar_uninstall() {
Addon::unregisterHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("unregistered gravatar in avatar_lookup hook");
Logger::log("unregistered gravatar in avatar_lookup hook");
}
function gravatar_load_config(App $a)
{
$a->loadConfigFile(__DIR__. '/config/gravatar.ini.php');
$a->loadConfigFile(__DIR__ . '/config/gravatar.config.php');
}
/**
@ -68,7 +73,7 @@ function gravatar_lookup($a, &$b) {
* Display admin settings for this addon
*/
function gravatar_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/gravatar/" );
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/gravatar/" );
$default_avatar = Config::get('gravatar', 'default_avatar');
$rating = Config::get('gravatar', 'rating');
@ -103,8 +108,8 @@ function gravatar_addon_admin (&$a, &$o) {
}
// output Gravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("gravatarsave") .'">';
$o .= replace_macros( $t, [
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("gravatarsave") .'">';
$o .= Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
'$rating' => ['rating', L10n::t('Rating of images'), $rating, L10n::t('Select the appropriate avatar rating for your site. See README'), $ratings],
@ -115,10 +120,10 @@ function gravatar_addon_admin (&$a, &$o) {
* Save admin settings
*/
function gravatar_addon_admin_post (&$a) {
check_form_security_token('gravatarsave');
BaseModule::checkFormSecurityToken('gravatarsave');
$default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon');
$rating = ((x($_POST, 'rating')) ? notags(trim($_POST['rating'])) : 'g');
$default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon');
$rating = (!empty($_POST['rating']) ? Strings::escapeTags(trim($_POST['rating'])) : 'g');
Config::set('gravatar', 'default_avatar', $default_avatar);
Config::set('gravatar', 'rating', $rating);
info(L10n::t('Gravatar settings updated.') .EOL);

View file

@ -4,14 +4,15 @@
#
#
# Translators:
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-08-30 17:12+0000\n"
"Last-Translator: Nicola Spanti <translations@nicola-spanti.info>\n"
"PO-Revision-Date: 2018-11-13 12:05+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,7 +26,7 @@ msgstr "image de profil générique"
#: gravatar.php:72
msgid "random geometric pattern"
msgstr ""
msgstr "Schéma géométrique aléatoire "
#: gravatar.php:73
msgid "monster face"

View file

@ -2,11 +2,12 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["generic profile image"] = "image de profil générique";
$a->strings["random geometric pattern"] = "";
$a->strings["random geometric pattern"] = "Schéma géométrique aléatoire ";
$a->strings["monster face"] = "";
$a->strings["computer generated face"] = "visage généré par ordinateur";
$a->strings["retro arcade style face"] = "";

View file

@ -7,6 +7,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function group_text_install() {
@ -14,7 +15,7 @@ function group_text_install() {
Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("installed group_text");
Logger::log("installed group_text");
}
@ -24,7 +25,7 @@ function group_text_uninstall() {
Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("removed group_text");
Logger::log("removed group_text");
}
@ -39,7 +40,7 @@ function group_text_uninstall() {
*/
function group_text_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'group_text-submit')))
if(! local_user() || empty($_POST['group_text-submit']))
return;
PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
@ -63,7 +64,7 @@ function group_text_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/group_text/group_text.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/group_text/group_text.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:40+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-12 09:47+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: group_text.php:46
msgid "Group Text settings updated."
msgstr "Nastavení textu skupiny aktualizováno."
msgstr "Nastavení Group Text aktualizována."
#: group_text.php:76
msgid "Group Text"
@ -29,7 +30,7 @@ msgstr "Skupinový text"
#: group_text.php:78
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin."
msgstr "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin."
#: group_text.php:84
msgid "Submit"

View file

@ -2,10 +2,11 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Group Text settings updated."] = "Nastavení textu skupiny aktualizováno.";
$a->strings["Group Text settings updated."] = "Nastavení Group Text aktualizována.";
$a->strings["Group Text"] = "Skupinový text";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin.";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin.";
$a->strings["Submit"] = "Odeslat";

1646
highlightjs/asset/CHANGES.md Normal file
View file

@ -0,0 +1,1646 @@
## Version 9.12.0
New language:
- *MikroTik* RouterOS Scripting language by [Ivan Dementev][].
New style:
- *VisualStudio 2015 Dark* by [Nicolas LLOBERA][]
Improvements:
- *Crystal* updated with new keywords and syntaxes by [Tsuyusato Kitsune][].
- *Julia* updated to the modern definitions by [Alex Arslan][].
- *julia-repl* added by [Morten Piibeleht][].
- [Stanislav Belov][] wrote a new definition for *1C*, replacing the one that
has not been updated for more than 8 years. The new version supports syntax
for versions 7.7 and 8.
- [Nicolas LLOBERA][] improved C# definition fixing edge cases with function
titles detection and added highlighting of `[Attributes]`.
- [nnnik][] provided a few correctness fixes for *Autohotkey*.
- [Martin Clausen][] made annotation collections in *Clojure* to look
consistently with other kinds.
- [Alejandro Alonso][] updated *Swift* keywords.
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
[Alex Arslan]: https://github.com/ararslan
[Morten Piibeleht]: https://github.com/mortenpi
[Stanislav Belov]: https://github.com/4ppl
[Ivan Dementev]: https://github.com/DiVAN1x
[Nicolas LLOBERA]: https://github.com/Nicolas01
[nnnik]: https://github.com/nnnik
[Martin Clausen]: https://github.com/maacl
[Alejandro Alonso]: https://github.com/Azoy
## Version 9.11.0
New languages:
- *Shell* by [Tsuyusato Kitsune][]
- *jboss-cli* by [Raphaël Parrëe][]
Improvements:
- [Joël Porquet] has [greatly improved the definition of *makefile*][5b3e0e6].
- *C++* class titles are now highlighted as in other languages with classes.
- [Jordi Petit][] added rarely used `or`, `and` and `not` keywords to *C++*.
- [Pieter Vantorre][] fixed highlighting of negative floating point values.
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
[Jordi Petit]: https://github.com/jordi-petit
[Raphaël Parrëe]: https://github.com/rparree
[Pieter Vantorre]: https://github.com/NuclearCookie
[5b3e0e6]: https://github.com/isagalaev/highlight.js/commit/5b3e0e68bfaae282faff6697d6a490567fa9d44b
## Version 9.10.0
Apologies for missing the previous release cycle. Some thing just can't be
automated… Anyway, we're back!
New languages:
- *Hy* by [Sergey Sobko][]
- *Leaf* by [Hale Chan][]
- *N1QL* by [Andres Täht][] and [Rene Saarsoo][]
Improvements:
- *Rust* got updated with new keywords by [Kasper Andersen][] and then
significantly modernized even more by [Eduard-Mihai Burtescu][] (yes, @eddyb,
Rust core team member!)
- *Python* updated with f-literals by [Philipp A][].
- *YAML* updated with unquoted strings support.
- *Gauss* updated with new keywords by [Matt Evans][].
- *Lua* updated with new keywords by [Joe Blow][].
- *Kotlin* updated with new keywords by [Philipp Hauer][].
- *TypeScript* got highlighting of function params and updated keywords by
[Ike Ku][].
- *Scheme* now correctly handles \`-quoted lists thanks to [Guannan Wei].
- [Sam Wu][] fixed handling of `<<` in *C++* defines.
[Philipp A]: https://github.com/flying-sheep
[Philipp Hauer]: https://github.com/phauer
[Sergey Sobko]: https://github.com/profitware
[Hale Chan]: https://github.com/halechan
[Matt Evans]: https://github.com/matthewevans
[Joe Blow]: https://github.com/mossarelli
[Kasper Andersen]: https://github.com/kasma1990
[Eduard-Mihai Burtescu]: https://github.com/eddyb
[Andres Täht]: https://github.com/andrestaht
[Rene Saarsoo]: https://github.com/nene
[Philipp Hauer]: https://github.com/phauer
[Ike Ku]: https://github.com/dempfi
[Guannan Wei]: https://github.com/Kraks
[Sam Wu]: https://github.com/samsam2310
## Version 9.9.0
New languages
- *LLVM* by [Michael Rodler][]
Improvements:
- *TypeScript* updated with annotations and param lists inside constructors, by
[Raphael Parree][].
- *CoffeeScript* updated with new keywords and fixed to recognize JavaScript
in \`\`\`, thanks to thanks to [Geoffrey Booth][].
- Compiler directives in *Delphi* are now correctly highlighted as "meta".
[Raphael Parree]: https://github.com/rparree
[Michael Rodler]: https://github.com/f0rki
[Geoffrey Booth]: https://github.com/GeoffreyBooth
## Version 9.8.0 "New York"
This version is the second one that deserved a name. Because I'm in New York,
and the release isn't missing the deadline only because it's still Tuesday on
West Coast.
New languages:
- *Clean* by [Camil Staps][]
- *Flix* by [Magnus Madsen][]
Improvements:
- [Kenton Hamaluik][] did a comprehensive update for *Haxe*.
- New commands for *PowerShell* from [Nicolas Le Gall][].
- [Jan T. Sott][] updated *NSIS*.
- *Java* and *Swift* support unicode characters in identifiers thanks to
[Alexander Lichter][].
[Camil Staps]: https://github.com/camilstaps
[Magnus Madsen]: https://github.com/magnus-madsen
[Kenton Hamaluik]: https://github.com/FuzzyWuzzie
[Nicolas Le Gall]: https://github.com/darkitty
[Jan T. Sott]: https://github.com/idleberg
[Alexander Lichter]: https://github.com/manniL
## Version 9.7.0
A comprehensive bugfix release. This is one of the best things about
highlight.js: even boring things keep getting better (even if slow).
- VHDL updated with PSL keywords and uses more consistent styling.
- Nested C-style comments no longer break highlighting in many languages.
- JavaScript updated with `=>` functions, highlighted object attributes and
parsing within template string substitution blocks (`${...}`).
- Fixed another corner case with self-closing `<tag/>` in JSX.
- Added `HEALTHCHECK` directive in Docker.
- Delphi updated with new Free Pascal keywords.
- Fixed digit separator parsing in C++.
- C# updated with new keywords and fixed to allow multiple identifiers within
generics `<...>`.
- Fixed another slow regex in Less.
## Version 9.6.0
New languages:
- *ABNF* and *EBNF* by [Alex McKibben][]
- *Awk* by [Matthew Daly][]
- *SubUnit* by [Sergey Bronnikov][]
New styles:
- *Atom One* in both Dark and Light variants by [Daniel Gamage][]
Plus, a few smaller updates for *Lasso*, *Elixir*, *C++* and *SQL*.
[Alex McKibben]: https://github.com/mckibbenta
[Daniel Gamage]: https://github.com/danielgamage
[Matthew Daly]: https://github.com/matthewbdaly
[Sergey Bronnikov]: https://github.com/ligurio
## Version 9.5.0
New languages:
- *Excel* by [Victor Zhou][]
- *Linden Scripting Language* by [Builder's Brewery][]
- *TAP* (Test Anything Protocol) by [Sergey Bronnikov][]
- *Pony* by [Joe Eli McIlvain][]
- *Coq* by [Stephan Boyer][]
- *dsconfig* and *LDIF* by [Jacob Childress][]
New styles:
- *Ocean Dark* by [Gavin Siu][]
Notable changes:
- [Minh Nguyễn][] added more built-ins to Objective C.
- [Jeremy Hull][] fixed corner cases in C++ preprocessor directives and Diff
comments.
- [Victor Zhou][] added support for digit separators in C++ numbers.
[Gavin Siu]: https://github.com/gavsiu
[Builder's Brewery]: https://github.com/buildersbrewery
[Victor Zhou]: https://github.com/OiCMudkips
[Sergey Bronnikov]: https://github.com/ligurio
[Joe Eli McIlvain]: https://github.com/jemc
[Stephan Boyer]: https://github.com/boyers
[Jacob Childress]: https://github.com/braveulysses
[Minh Nguyễn]: https://github.com/1ec5
[Jeremy Hull]: https://github.com/sourrust
## Version 9.4.0
New languages:
- *PureBASIC* by [Tristano Ajmone][]
- *BNF* by [Oleg Efimov][]
- *Ada* by [Lars Schulna][]
New styles:
- *PureBASIC* by [Tristano Ajmone][]
Improvements to existing languages and styles:
- We now highlight function declarations in Go.
- [Taisuke Fujimoto][] contributed very convoluted rules for raw and
interpolated strings in C#.
- [Boone Severson][] updated Verilog to comply with IEEE 1800-2012
SystemVerilog.
- [Victor Zhou][] improved rules for comments and strings in PowerShell files.
- [Janis Voigtländer][] updated the definition of Elm to version 0.17 of the
languages. Elm is now featured on the front page of <https://highlightjs.org>.
- Special variable `$this` is highlighted as a keyword in PHP.
- `usize` and `isize` are now highlighted in Rust.
- Fixed labels and directives in x86 assembler.
[Tristano Ajmone]: https://github.com/tajmone
[Taisuke Fujimoto]: https://github.com/temp-impl
[Oleg Efimov]: https://github.com/Sannis
[Boone Severson]: https://github.com/BooneJS
[Victor Zhou]: https://github.com/OiCMudkips
[Lars Schulna]: https://github.com/captain-hanuta
[Janis Voigtländer]: https://github.com/jvoigtlaender
## Version 9.3.0
New languages:
- *Tagger Script* by [Philipp Wolfer][]
- *MoonScript* by [Billy Quith][]
New styles:
- *xt256* by [Herbert Shin][]
Improvements to existing languages and styles:
- More robust handling of unquoted HTML tag attributes
- Relevance tuning for QML which was unnecessary eager at seizing other
languages' code
- Improve GAMS language parsing
- Fixed a bunch of bugs around selectors in Less
- Kotlin's got a new definition for annotations, updated keywords and other
minor improvements
- Added `move` to Rust keywords
- Markdown now recognizes \`\`\`-fenced code blocks
- Improved detection of function declarations in C++ and C#
[Philipp Wolfer]: https://github.com/phw
[Billy Quith]: https://github.com/billyquith
[Herbert Shin]: https://github.com/initbar
## Version 9.2.0
New languages:
- *QML* by [John Foster][]
- *HTMLBars* by [Michael Johnston][]
- *CSP* by [Taras][]
- *Maxima* by [Robert Dodier][]
New styles:
- *Gruvbox* by [Qeole][]
- *Dracula* by [Denis Ciccale][]
Improvements to existing languages and styles:
- We now correctly handle JSX with arbitrary node tree depth.
- Argument list for `(lambda)` in Scheme is no longer highlighted as a function
call.
- Stylus syntax doesn't break on valid CSS.
- More correct handling of comments and strings and other improvements for
VimScript.
- More subtle work on the default style.
- We now use anonymous modules for AMD.
- `macro_rules!` is now recognized as a built-in in Rust.
[John Foster]: https://github.com/jf990
[Qeole]: https://github.com/Qeole
[Denis Ciccale]: https://github.com/dciccale
[Michael Johnston]: https://github.com/lastobelus
[Taras]: https://github.com/oxdef
[Robert Dodier]: https://github.com/robert-dodier
## Version 9.1.0
New languages:
- *Stan* by [Brendan Rocks][]
- *BASIC* by [Raphaël Assénat][]
- *GAUSS* by [Matt Evans][]
- *DTS* by [Martin Braun][]
- *Arduino* by [Stefania Mellai][]
New Styles:
- *Arduino Light* by [Stefania Mellai][]
Improvements to existing languages and styles:
- Handle return type annotations in Python
- Allow shebang headers in Javascript
- Support strings in Rust meta
- Recognize `struct` as a class-level definition in Rust
- Recognize b-prefixed chars and strings in Rust
- Better numbers handling in Verilog
[Brendan Rocks]: http://brendanrocks.com
[Raphaël Assénat]: https://github.com/raphnet
[Matt Evans]: https://github.com/matthewevans
[Martin Braun]: https://github.com/mbr0wn
[Stefania Mellai]: https://github.com/smellai
## Version 9.0.0
The new major version brings a reworked styling system. Highlight.js now defines
a limited set of highlightable classes giving a consistent result across all the
styles and languages. You can read a more detailed explanation and background in
the [tracking issue][#348] that started this long process back in May.
This change is backwards incompatible for those who uses highlight.js with a
custom stylesheet. The [new style guide][sg] explains how to write styles
in this new world.
Bundled themes have also suffered a significant amount of improvements and may
look different in places, but all the things now consistent and make more sense.
Among others, the Default style has got a refresh and will probably be tweaked
some more in next releases. Please do give your feedback in our
[issue tracker][issues].
New languages in this release:
- *Caché Object Script* by [Nikita Savchenko][]
- *YAML* by [Stefan Wienert][]
- *MIPS Assembler* by [Nebuleon Fumika][]
- *HSP* by [prince][]
Improvements to existing languages and styles:
- ECMAScript 6 modules import now do not require closing semicolon.
- ECMAScript 6 classes constructors now highlighted.
- Template string support for Typescript, as for ECMAScript 6.
- Scala case classes params highlight fixed.
- Built-in names introduced in Julia v0.4 added by [Kenta Sato][].
- Refreshed Default style.
Other notable changes:
- [Web workers support][webworkers] added bu [Jan Kühle][].
- We now have tests for compressed browser builds as well.
- The building tool chain has been switched to node.js 4.x. and is now
shamelessly uses ES6 features all over the place, courtesy of [Jeremy Hull][].
- License added to non-compressed browser build.
[Jan Kühle]: https://github.com/frigus02
[Stefan Wienert]: https://github.com/zealot128
[Kenta Sato]: https://github.com/bicycle1885
[Nikita Savchenko]: https://github.com/ZitRos
[webworkers]: https://github.com/isagalaev/highlight.js#web-workers
[Jeremy Hull]: https://github.com/sourrust
[#348]: https://github.com/isagalaev/highlight.js/issues/348
[sg]: http://highlightjs.readthedocs.org/en/latest/style-guide.html
[issues]: https://github.com/isagalaev/highlight.js/issues
[Nebuleon Fumika]: https://github.com/Nebuleon
[prince]: https://github.com/prince-0203
## Version 8.9.1
Some last-minute changes reverted due to strange bug with minified browser build:
- Scala case classes params highlight fixed
- ECMAScript 6 modules import now do not require closing semicolon
- ECMAScript 6 classes constructors now highlighted
- Template string support for Typescript, as for ECMAScript 6
- License added to not minified browser build
## Version 8.9.0
New languages:
- *crmsh* by [Kristoffer Gronlund][]
- *SQF* by [Soren Enevoldsen][]
[Kristoffer Gronlund]: https://github.com/krig
[Soren Enevoldsen]: https://github.com/senevoldsen90
Notable fixes and improvements to existing languages:
- Added `abstract` and `namespace` keywords to TypeScript by [Daniel Rosenwasser][]
- Added `label` support to Dockerfile by [Ladislav Prskavec][]
- Crystal highlighting improved by [Tsuyusato Kitsune][]
- Missing Swift keywords added by [Nate Cook][]
- Improve detection of C block comments
- ~~Scala case classes params highlight fixed~~
- ~~ECMAScript 6 modules import now do not require closing semicolon~~
- ~~ECMAScript 6 classes constructors now highlighted~~
- ~~Template string support for Typescript, as for ECMAScript 6~~
Other notable changes:
- ~~License added to not minified browser build~~
[Kristoffer Gronlund]: https://github.com/krig
[Søren Enevoldsen]: https://github.com/senevoldsen90
[Daniel Rosenwasser]: https://github.com/DanielRosenwasser
[Ladislav Prskavec]: https://github.com/abtris
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
[Nate Cook]: https://github.com/natecook1000
## Version 8.8.0
New languages:
- *Golo* by [Philippe Charrière][]
- *GAMS* by [Stefan Bechert][]
- *IRPF90* by [Anthony Scemama][]
- *Access logs* by [Oleg Efimov][]
- *Crystal* by [Tsuyusato Kitsune][]
Notable fixes and improvements to existing languages:
- JavaScript highlighting no longer fails with ES6 default parameters
- Added keywords `async` and `await` to Python
- PHP heredoc support improved
- Allow preprocessor directives within C++ functions
Other notable changes:
- Change versions to X.Y.Z SemVer-compatible format
- Added ability to build all targets at once
[Philippe Charrière]: https://github.com/k33g
[Stefan Bechert]: https://github.com/b-pos465
[Anthony Scemama]: https://github.com/scemama
[Oleg Efimov]: https://github.com/Sannis
[Tsuyusato Kitsune]: https://github.com/MakeNowJust
## Version 8.7
New languages:
- *Zephir* by [Oleg Efimov][]
- *Elm* by [Janis Voigtländer][]
- *XQuery* by [Dirk Kirsten][]
- *Mojolicious* by [Dotan Dimet][]
- *AutoIt* by Manh Tuan from [J2TeaM][]
- *Toml* (ini extension) by [Guillaume Gomez][]
New styles:
- *Hopscotch* by [Jan T. Sott][]
- *Grayscale* by [MY Sun][]
Notable fixes and improvements to existing languages:
- Fix encoding of images when copied over in certain builds
- Fix incorrect highlighting of the word "bug" in comments
- Treat decorators different from matrix multiplication in Python
- Fix traits inheritance highlighting in Rust
- Fix incorrect document
- Oracle keywords added to SQL language definition by [Vadimtro][]
- Postgres keywords added to SQL language definition by [Benjamin Auder][]
- Fix registers in x86asm being highlighted as a hex number
- Fix highlighting for numbers with a leading decimal point
- Correctly highlight numbers and strings inside of C/C++ macros
- C/C++ functions now support pointer, reference, and move returns
[Oleg Efimov]: https://github.com/Sannis
[Guillaume Gomez]: https://github.com/GuillaumeGomez
[Janis Voigtländer]: https://github.com/jvoigtlaender
[Jan T. Sott]: https://github.com/idleberg
[Dirk Kirsten]: https://github.com/dirkk
[MY Sun]: https://github.com/simonmysun
[Vadimtro]: https://github.com/Vadimtro
[Benjamin Auder]: https://github.com/ghost
[Dotan Dimet]: https://github.com/dotandimet
[J2TeaM]: https://github.com/J2TeaM
## Version 8.6
New languages:
- *C/AL* by [Kenneth Fuglsang][]
- *DNS zone file* by [Tim Schumacher][]
- *Ceylon* by [Lucas Werkmeister][]
- *OpenSCAD* by [Dan Panzarella][]
- *Inform7* by [Bruno Dias][]
- *armasm* by [Dan Panzarella][]
- *TP* by [Jay Strybis][]
New styles:
- *Atelier Cave*, *Atelier Estuary*,
*Atelier Plateau* and *Atelier Savanna* by [Bram de Haan][]
- *Github Gist* by [Louis Barranqueiro][]
Notable fixes and improvements to existing languages:
- Multi-line raw strings from C++11 are now supported
- Fix class names with dashes in HAML
- The `async` keyword from ES6/7 is now supported
- TypeScript functions handle type and parameter complexity better
- We unified phpdoc/javadoc/yardoc etc modes across all languages
- CSS .class selectors relevance was dropped to prevent wrong language detection
- Images is now included to CDN build
- Release process is now automated
[Bram de Haan]: https://github.com/atelierbram
[Kenneth Fuglsang]: https://github.com/kfuglsang
[Louis Barranqueiro]: https://github.com/LouisBarranqueiro
[Tim Schumacher]: https://github.com/enko
[Lucas Werkmeister]: https://github.com/lucaswerkmeister
[Dan Panzarella]: https://github.com/pzl
[Bruno Dias]: https://github.com/sequitur
[Jay Strybis]: https://github.com/unreal
## Version 8.5
New languages:
- *pf.conf* by [Peter Piwowarski][]
- *Julia* by [Kenta Sato][]
- *Prolog* by [Raivo Laanemets][]
- *Docker* by [Alexis Hénaut][]
- *Fortran* by [Anthony Scemama][] and [Thomas Applencourt][]
- *Kotlin* by [Sergey Mashkov][]
New styles:
- *Agate* by [Taufik Nurrohman][]
- *Darcula* by [JetBrains][]
- *Atelier Sulphurpool* by [Bram de Haan][]
- *Android Studio* by [Pedro Oliveira][]
Notable fixes and improvements to existing languages:
- ES6 features in JavaScript are better supported now by [Gu Yiling][].
- Swift now recognizes body-less method definitions.
- Single expression functions `def foo, do: ... ` now work in Elixir.
- More uniform detection of built-in classes in Objective C.
- Fixes for number literals and processor directives in Rust.
- HTML `<script>` tag now allows any language, not just JavaScript.
- Multi-line comments are supported now in MatLab.
[Taufik Nurrohman]: https://github.com/tovic
[Jet Brains]: https://www.jetbrains.com/
[Peter Piwowarski]: https://github.com/oldlaptop
[Kenta Sato]: https://github.com/bicycle1885
[Bram de Haan]: https://github.com/atelierbram
[Raivo Laanemets]: https://github.com/rla
[Alexis Hénaut]: https://github.com/AlexisNo
[Anthony Scemama]: https://github.com/scemama
[Pedro Oliveira]: https://github.com/kanytu
[Gu Yiling]: https://github.com/Justineo
[Sergey Mashkov]: https://github.com/cy6erGn0m
[Thomas Applencourt]: https://github.com/TApplencourt
## Version 8.4
We've got the new [demo page][]! The obvious new feature is the new look, but
apart from that it's got smarter: by presenting languages in groups it avoids
running 10000 highlighting attempts after first load which was slowing it down
and giving bad overall impression. It is now also being generated from test
code snippets so the authors of new languages don't have to update both tests
and the demo page with the same thing.
Other notable changes:
- The `template_comment` class is gone in favor of the more general `comment`.
- Number parsing unified and improved across languages.
- C++, Java and C# now use unified grammar to highlight titles in
function/method definitions.
- The browser build is now usable as an AMD module, there's no separate build
target for that anymore.
- OCaml has got a [comprehensive overhaul][ocaml] by [Mickaël Delahaye][].
- Clojure's data structures and literals are now highlighted outside of lists
and we can now highlight Clojure's REPL sessions.
New languages:
- *AspectJ* by [Hakan Özler][]
- *STEP Part 21* by [Adam Joseph Cook][]
- *SML* derived by [Edwin Dalorzo][] from OCaml definition
- *Mercury* by [mucaho][]
- *Smali* by [Dennis Titze][]
- *Verilog* by [Jon Evans][]
- *Stata* by [Brian Quistorff][]
[Hakan Özler]: https://github.com/ozlerhakan
[Adam Joseph Cook]: https://github.com/adamjcook
[demo page]: https://highlightjs.org/static/demo/
[Ivan Sagalaev]: https://github.com/isagalaev
[Edwin Dalorzo]: https://github.com/edalorzo
[mucaho]: https://github.com/mucaho
[Dennis Titze]: https://github.com/titze
[Jon Evans]: https://github.com/craftyjon
[Brian Quistorff]: https://github.com/bquistorff
[ocaml]: https://github.com/isagalaev/highlight.js/pull/608#issue-46190207
[Mickaël Delahaye]: https://github.com/polazarus
## Version 8.3
We streamlined our tool chain, it is now based entirely on node.js instead of
being a mix of node.js, Python and Java. The build script options and arguments
remained the same, and we've noted all the changes in the [documentation][b].
Apart from reducing complexity, the new build script is also faster from not
having to start Java machine repeatedly. The credits for the work go to [Jeremy
Hull][].
Some notable fixes:
- PHP and JavaScript mixed in HTML now live happily with each other.
- JavaScript regexes now understand ES6 flags "u" and "y".
- `throw` keyword is no longer detected as a method name in Java.
- Fixed parsing of numbers and symbols in Clojure thanks to [input from Ivan
Kleshnin][ik].
New languages in this release:
- *Less* by [Max Mikhailov][]
- *Stylus* by [Bryant Williams][]
- *Tcl* by [Radek Liska][]
- *Puppet* by [Jose Molina Colmenero][]
- *Processing* by [Erik Paluka][]
- *Twig* templates by [Luke Holder][]
- *PowerShell* by [David Mohundro][], based on [the work of Nicholas Blumhardt][ps]
- *XL* by [Christophe de Dinechin][]
- *LiveScript* by [Taneli Vatanen][] and [Jen Evers-Corvina][]
- *ERB* (Ruby in HTML) by [Lucas Mazza][]
- *Roboconf* by [Vincent Zurczak][]
[b]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
[Jeremy Hull]: https://github.com/sourrust
[ik]: https://twitter.com/IvanKleshnin/status/514041599484231680
[Max Mikhailov]: https://github.com/seven-phases-max
[Bryant Williams]: https://github.com/scien
[Radek Liska]: https://github.com/Nindaleth
[Jose Molina Colmenero]: https://github.com/Moliholy
[Erik Paluka]: https://github.com/paluka
[Luke Holder]: https://github.com/lukeholder
[David Mohundro]: https://github.com/drmohundro
[ps]: https://github.com/OctopusDeploy/Library/blob/master/app/shared/presentation/highlighting/powershell.js
[Christophe de Dinechin]: https://github.com/c3d
[Taneli Vatanen]: https://github.com/Daiz-
[Jen Evers-Corvina]: https://github.com/sevvie
[Lucas Mazza]: https://github.com/lucasmazza
[Vincent Zurczak]: https://github.com/vincent-zurczak
## Version 8.2
We've finally got [real tests][test] and [continuous testing on Travis][ci]
thanks to [Jeremy Hull][] and [Chris Eidhof][]. The tests designed to cover
everything: language detection, correct parsing of individual language features
and various special cases. This is a very important change that gives us
confidence in extending language definitions and refactoring library core.
We're going to redesign the old [demo/test suite][demo] into an interactive
demo web app. If you're confident front-end developer or designer and want to
help us with it, drop a comment into [the issue][#542] on GitHub.
[test]: https://github.com/isagalaev/highlight.js/tree/master/test
[demo]: https://highlightjs.org/static/test.html
[#542]: https://github.com/isagalaev/highlight.js/issues/542
[ci]: https://travis-ci.org/isagalaev/highlight.js
[Jeremy Hull]: https://github.com/sourrust
[Chris Eidhof]: https://github.com/chriseidhof
As usually there's a handful of new languages in this release:
- *Groovy* by [Guillaume Laforge][]
- *Dart* by [Maxim Dikun][]
- *Dust* by [Michael Allen][]
- *Scheme* by [JP Verkamp][]
- *G-Code* by [Adam Joseph Cook][]
- *Q* from Kx Systems by [Sergey Vidyuk][]
[Guillaume Laforge]: https://github.com/glaforge
[Maxim Dikun]: https://github.com/dikmax
[Michael Allen]: https://github.com/bfui
[JP Verkamp]: https://github.com/jpverkamp
[Adam Joseph Cook]: https://github.com/adamjcook
[Sergey Vidyuk]: https://github.com/sv
Other improvements:
- [Erik Osheim][] heavily reworked Scala definitions making it richer.
- [Lucas Mazza][] fixed Ruby hashes highlighting
- Lisp variants (Lisp, Clojure and Scheme) are unified in regard to naming
the first symbol in parentheses: it's "keyword" in general case and also
"built_in" for built-in functions in Clojure and Scheme.
[Erik Osheim]: https://github.com/non
[Lucas Mazza]: https://github.com/lucasmazza
## Version 8.1
New languages:
- *Gherkin* by [Sam Pikesley][]
- *Elixir* by [Josh Adams][]
- *NSIS* by [Jan T. Sott][]
- *VIM script* by [Jun Yang][]
- *Protocol Buffers* by [Dan Tao][]
- *Nix* by [Domen Kožar][]
- *x86asm* by [innocenat][]
- *Capn Proto* and *Thrift* by [Oleg Efimov][]
- *Monkey* by [Arthur Bikmullin][]
- *TypeScript* by [Panu Horsmalahti][]
- *Nimrod* by [Flaviu Tamas][]
- *Gradle* by [Damian Mee][]
- *Haxe* by [Christopher Kaster][]
- *Swift* by [Chris Eidhof][] and [Nate Cook][]
New styles:
- *Kimbie*, light and dark variants by [Jan T. Sott][]
- *Color brewer* by [Fabrício Tavares de Oliveira][]
- *Codepen.io embed* by [Justin Perry][]
- *Hybrid* by [Nic West][]
[Sam Pikesley]: https://github.com/pikesley
[Sindre Sorhus]: https://github.com/sindresorhus
[Josh Adams]: https://github.com/knewter
[Jan T. Sott]: https://github.com/idleberg
[Jun Yang]: https://github.com/harttle
[Dan Tao]: https://github.com/dtao
[Domen Kožar]: https://github.com/iElectric
[innocenat]: https://github.com/innocenat
[Oleg Efimov]: https://github.com/Sannis
[Arthur Bikmullin]: https://github.com/devolonter
[Panu Horsmalahti]: https://github.com/panuhorsmalahti
[Flaviu Tamas]: https://github.com/flaviut
[Damian Mee]: https://github.com/chester1000
[Christopher Kaster]: http://christopher.kaster.ws
[Fabrício Tavares de Oliveira]: https://github.com/fabriciotav
[Justin Perry]: https://github.com/ourmaninamsterdam
[Nic West]: https://github.com/nicwest
[Chris Eidhof]: https://github.com/chriseidhof
[Nate Cook]: https://github.com/natecook1000
Other improvements:
- The README is heavily reworked and brought up to date by [Jeremy Hull][].
- Added [`listLanguages()`][ll] method in the API.
- Improved C/C++/C# detection.
- Added a bunch of new language aliases, documented the existing ones. Thanks to
[Sindre Sorhus][] for background research.
- Added phrasal English words to boost relevance in comments.
- Many improvements to SQL definition made by [Heiko August][],
[Nikolay Lisienko][] and [Travis Odom][].
- The shorter `lang-` prefix for language names in HTML classes supported
alongside `language-`. Thanks to [Jeff Escalante][].
- Ruby's got support for interactive console sessions. Thanks to
[Pascal Hurni][].
- Added built-in functions for R language. Thanks to [Artem A. Klevtsov][].
- Rust's got definition for lifetime parameters and improved string syntax.
Thanks to [Roman Shmatov][].
- Various improvements to Objective-C definition by [Matt Diephouse][].
- Fixed highlighting of generics in Java.
[ll]: http://highlightjs.readthedocs.org/en/latest/api.html#listlanguages
[Sindre Sorhus]: https://github.com/sindresorhus
[Heiko August]: https://github.com/auge8472
[Nikolay Lisienko]: https://github.com/neor-ru
[Travis Odom]: https://github.com/Burstaholic
[Jeff Escalante]: https://github.com/jenius
[Pascal Hurni]: https://github.com/phurni
[Jiyin Yiyong]: https://github.com/jiyinyiyong
[Artem A. Klevtsov]: https://github.com/unikum
[Roman Shmatov]: https://github.com/shmatov
[Jeremy Hull]: https://github.com/sourrust
[Matt Diephouse]: https://github.com/mdiep
## Version 8.0
This new major release is quite a big overhaul bringing both new features and
some backwards incompatible changes. However, chances are that the majority of
users won't be affected by the latter: the basic scenario described in the
README is left intact.
Here's what did change in an incompatible way:
- We're now prefixing all classes located in [CSS classes reference][cr] with
`hljs-`, by default, because some class names would collide with other
people's stylesheets. If you were using an older version, you might still want
the previous behavior, but still want to upgrade. To suppress this new
behavior, you would initialize like so:
```html
<script type="text/javascript">
hljs.configure({classPrefix: ''});
hljs.initHighlightingOnLoad();
</script>
```
- `tabReplace` and `useBR` that were used in different places are also unified
into the global options object and are to be set using `configure(options)`.
This function is documented in our [API docs][]. Also note that these
parameters are gone from `highlightBlock` and `fixMarkup` which are now also
rely on `configure`.
- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
was used to register languages with the library in favor of two new methods:
`registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
- Result returned from `highlight` and `highlightAuto` no longer contains two
separate attributes contributing to relevance score, `relevance` and
`keyword_count`. They are now unified in `relevance`.
Another technically compatible change that nonetheless might need attention:
- The structure of the NPM package was refactored, so if you had installed it
locally, you'll have to update your paths. The usual `require('highlight.js')`
works as before. This is contributed by [Dmitry Smolin][].
New features:
- Languages now can be recognized by multiple names like "js" for JavaScript or
"html" for, well, HTML (which earlier insisted on calling it "xml"). These
aliases can be specified in the class attribute of the code container in your
HTML as well as in various API calls. For now there are only a few very common
aliases but we'll expand it in the future. All of them are listed in the
[class reference][cr].
- Language detection can now be restricted to a subset of languages relevant in
a given context — a web page or even a single highlighting call. This is
especially useful for node.js build that includes all the known languages.
Another example is a StackOverflow-style site where users specify languages
as tags rather than in the markdown-formatted code snippets. This is
documented in the [API reference][] (see methods `highlightAuto` and
`configure`).
- Language definition syntax streamlined with [variants][] and
[beginKeywords][].
New languages and styles:
- *Oxygene* by [Carlo Kok][]
- *Mathematica* by [Daniel Kvasnička][]
- *Autohotkey* by [Seongwon Lee][]
- *Atelier* family of styles in 10 variants by [Bram de Haan][]
- *Paraíso* styles by [Jan T. Sott][]
Miscellaneous improvements:
- Highlighting `=>` prompts in Clojure.
- [Jeremy Hull][] fixed a lot of styles for consistency.
- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
- Objective C and C# now properly highlight titles in method definition.
- Big overhaul of relevance counting for a number of languages. Please do report
bugs about mis-detection of non-trivial code snippets!
[API reference]: http://highlightjs.readthedocs.org/en/latest/api.html
[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
[php-html]: https://twitter.com/highlightjs/status/408890903017689088
[Carlo Kok]: https://github.com/carlokok
[Bram de Haan]: https://github.com/atelierbram
[Daniel Kvasnička]: https://github.com/dkvasnicka
[Dmitry Smolin]: https://github.com/dimsmol
[Jeremy Hull]: https://github.com/sourrust
[Seongwon Lee]: https://github.com/dlimpid
[Jan T. Sott]: https://github.com/idleberg
## Version 7.5
A catch-up release dealing with some of the accumulated contributions. This one
is probably will be the last before the 8.0 which will be slightly backwards
incompatible regarding some advanced use-cases.
One outstanding change in this version is the addition of 6 languages to the
[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
Makefile. It now weighs about 6K more but we're going to keep it under 30K.
New languages:
- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
- [LiveCode Server][lcs] by [Ralf Bitter][revig]
- Scilab by [Sylvestre Ledru][sylvestre]
- basic support for Makefile by [Ivan Sagalaev][isagalaev]
Improvements:
- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
regexps.
- Clojure now allows a function call in the beginning of s-expressions
`(($filter "myCount") (arr 1 2 3 4 5))`.
- Haskell's got new keywords and now recognizes more things like pragmas,
preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
for the implementation and to [Jeremy Hull][sourrust] for guiding it.
- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
[mehdid]: https://github.com/mehdid
[nbraud]: https://github.com/nbraud
[revig]: https://github.com/revig
[lcs]: http://livecode.com/developers/guides/server/
[sylvestre]: https://github.com/sylvestre
[isagalaev]: https://github.com/isagalaev
[treep]: https://github.com/treep
[sourrust]: https://github.com/sourrust
[d]: http://highlightjs.org/download/
## New core developers
The latest long period of almost complete inactivity in the project coincided
with growing interest to it led to a decision that now seems completely obvious:
we need more core developers.
So without further ado let me welcome to the core team two long-time
contributors: [Jeremy Hull][] and [Oleg
Efimov][].
Hope now we'll be able to work through stuff faster!
P.S. The historical commit is [here][1] for the record.
[Jeremy Hull]: https://github.com/sourrust
[Oleg Efimov]: https://github.com/sannis
[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
## Version 7.4
This long overdue version is a snapshot of the current source tree with all the
changes that happened during the past year. Sorry for taking so long!
Along with the changes in code highlight.js has finally got its new home at
<http://highlightjs.org/>, moving from its cradle on Software Maniacs which it
outgrew a long time ago. Be sure to report any bugs about the site to
<mailto:info@highlightjs.org>.
On to what's new…
New languages:
- Handlebars templates by [Robin Ward][]
- Oracle Rules Language by [Jason Jacobson][]
- F# by [Joans Follesø][]
- AsciiDoc and Haml by [Dan Allen][]
- Lasso by [Eric Knibbe][]
- SCSS by [Kurt Emch][]
- VB.NET by [Poren Chiang][]
- Mizar by [Kelley van Evert][]
[Robin Ward]: https://github.com/eviltrout
[Jason Jacobson]: https://github.com/jayce7
[Joans Follesø]: https://github.com/follesoe
[Dan Allen]: https://github.com/mojavelinux
[Eric Knibbe]: https://github.com/EricFromCanada
[Kurt Emch]: https://github.com/kemch
[Poren Chiang]: https://github.com/rschiang
[Kelley van Evert]: https://github.com/kelleyvanevert
New style themes:
- Monokai Sublime by [noformnocontent][]
- Railscasts by [Damien White][]
- Obsidian by [Alexander Marenin][]
- Docco by [Simon Madine][]
- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
- Foundation by [Dan Allen][]
[noformnocontent]: http://nn.mit-license.org/
[Damien White]: https://github.com/visoft
[Alexander Marenin]: https://github.com/ioncreature
[Simon Madine]: https://github.com/thingsinjars
[Ivan Sagalaev]: https://github.com/isagalaev
Other notable changes:
- Corrected many corner cases in CSS.
- Dropped Python 2 version of the build tool.
- Implemented building for the AMD format.
- Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
- Literal regexes can now be used in language definitions.
- CoffeeScript highlighting is now significantly more robust and rich due to
input from [Cédric Néhémie][].
[Dmitry Medvinsky]: https://github.com/dmedvinsky
[Cédric Néhémie]: https://github.com/abe33
## Version 7.3
- Since this version highlight.js no longer works in IE version 8 and older.
It's made it possible to reduce the library size and dramatically improve code
readability and made it easier to maintain. Time to go forward!
- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
Brainfuck (by [Evgeny Stepanischev][bolk]).
- Improvements to existing languages:
- interpreter prompt in Python (`>>>` and `...`)
- @-properties and classes in CoffeeScript
- E4X in JavaScript (by [Oleg Efimov][oe])
- new keywords in Perl (by [Kirk Kimmel][kk])
- big Ruby syntax update (by [Vasily Polovnyov][vast])
- small fixes in Bash
- Also Oleg Efimov did a great job of moving all the docs for language and style
developers and contributors from the old wiki under the source code in the
"docs" directory. Now these docs are nicely presented at
<http://highlightjs.readthedocs.org/>.
[ng]: https://github.com/nathan11g
[dd]: https://github.com/drdrang
[bolk]: https://github.com/bolknote
[oe]: https://github.com/Sannis
[kk]: https://github.com/kimmel
[vast]: https://github.com/vast
## Version 7.2
A regular bug-fix release without any significant new features. Enjoy!
## Version 7.1
A Summer crop:
- [Marc Fornos][mf] made the definition for Clojure along with the matching
style Rainbow (which, of course, works for other languages too).
- CoffeeScript support continues to improve getting support for regular
expressions.
- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
[project by Chris Kempson][tm0].
- Thanks to [Casey Duncun][cd] the library can now be built in the popular
[AMD format][amd].
- And last but not least, we've got a fair number of correctness and consistency
fixes, including a pretty significant refactoring of Ruby.
[mf]: https://github.com/mfornos
[tm]: http://jmblog.github.com/color-themes-for-highlightjs/
[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
[cd]: https://github.com/caseman
[amd]: http://requirejs.org/docs/whyamd.html
## Version 7.0
The reason for the new major version update is a global change of keyword syntax
which resulted in the library getting smaller once again. For example, the
hosted build is 2K less than at the previous version while supporting two new
languages.
Notable changes:
- The library now works not only in a browser but also with [node.js][]. It is
installable with `npm install highlight.js`. [API][] docs are available on our
wiki.
- The new unique feature (apparently) among syntax highlighters is highlighting
*HTTP* headers and an arbitrary language in the request body. The most useful
languages here are *XML* and *JSON* both of which highlight.js does support.
Here's [the detailed post][p] about the feature.
- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
emulation of*XCode* IDE by [Angel Olloqui][ao].
- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
and *GLSL* by [Sergey Tikhomirov][st].
- *Nginx* syntax has become a million times smaller and more universal thanks to
remaking it in a more generic manner that doesn't require listing all the
directives in the known universe.
- Function titles are now highlighted in *PHP*.
- *Haskell* and *VHDL* were significantly reworked to be more rich and correct
by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
And last but not least, many bugs have been fixed around correctness and
language detection.
Overall highlight.js currently supports 51 languages and 20 style themes.
[node.js]: http://nodejs.org/
[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
[ao]: https://github.com/angelolloqui
[ar]: https://github.com/raleksandar
[jc]: https://github.com/jcheng5
[st]: https://github.com/tikhomirov
[sr]: https://github.com/sourrust
[ik]: https://github.com/ikalnitsky
## Version 6.2
A lot of things happened in highlight.js since the last version! We've got nine
new contributors, the discussion group came alive, and the main branch on GitHub
now counts more than 350 followers. Here are most significant results coming
from all this activity:
- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
[Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
Bardadym][db] and [John Crepezzi][jc].
- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
- A vast number of [correctness fixes and code refactorings][log], mostly made
by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
[av]: https://github.com/vlasovskikh
[am]: https://github.com/myadzel
[dn]: https://github.com/dnagir
[oe]: https://github.com/Sannis
[db]: https://github.com/btd
[jc]: https://github.com/seejohnrun
[lm]: http://grigio.org/
[ak]: https://github.com/geekpanth3r
[es]: https://github.com/bolknote
[log]: https://github.com/isagalaev/highlight.js/commits/
## Version 6.1 — Solarized
[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
style theme famous for being based on the intricate color theory to achieve
correct contrast and color perception. It is now available for highlight.js in
both variants — light and dark.
This version also adds a new original style Arta. Its author pumbur maintains a
[heavily modified fork of highlight.js][pb] on GitHub.
[jh]: https://github.com/sourrust
[solarized]: http://ethanschoonover.com/solarized
[pb]: https://github.com/pumbur/highlight.js
## Version 6.0
New major version of the highlighter has been built on a significantly
refactored syntax. Due to this it's even smaller than the previous one while
supporting more languages!
New languages are:
- Haskell by [Jeremy Hull][sourrust]
- Erlang in two varieties — module and REPL — made collectively by [Nikolay
Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
- Objective C by [Valerii Hiora][vhbit]
- Vala by [Antono Vasiljev][antono]
- Go by [Stephan Kountso][steplg]
[sourrust]: https://github.com/sourrust
[desh]: http://desh.su/
[arhibot]: https://github.com/arhibot
[ignatov]: https://github.com/ignatov
[vhbit]: https://github.com/vhbit
[antono]: https://github.com/antono
[steplg]: https://github.com/steplg
Also this version is marginally faster and fixes a number of small long-standing
bugs.
Developer overview of the new language syntax is available in a [blog post about
recent beta release][beta].
[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
P.S. New version is not yet available on a Yandex CDN, so for now you have to
download [your own copy][d].
[d]: /soft/highlight/en/download/
## Version 5.14
Fixed bugs in HTML/XML detection and relevance introduced in previous
refactoring.
Also test.html now shows the second best result of language detection by
relevance.
## Version 5.13
Past weekend began with a couple of simple additions for existing languages but
ended up in a big code refactoring bringing along nice improvements for language
developers.
### For users
- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
- Description of HTML has got new tags from [HTML 5][].
- CSS-styles have been unified to use consistent padding and also have lost
pop-outs with names of detected languages.
- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL.
This makes total number of languages supported by highlight.js to reach 35.
Bug fixes:
- Custom classes on `<pre>` tags are not being overridden anymore
- More correct highlighting of code blocks inside non-`<pre>` containers:
highlighter now doesn't insist on replacing them with its own container and
just replaces the contents.
- Small fixes in browser compatibility and heuristics.
[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
[html 5]: http://en.wikipedia.org/wiki/HTML5
[ik]: http://kalnitsky.org.ua/
### For developers
The most significant change is the ability to include language submodes right
under `contains` instead of defining explicit named submodes in the main array:
contains: [
'string',
'number',
{begin: '\\n', end: hljs.IMMEDIATE_RE}
]
This is useful for auxiliary modes needed only in one place to define parsing.
Note that such modes often don't have `className` and hence won't generate a
separate `<span>` in the resulting markup. This is similar in effect to
`noMarkup: true`. All existing languages have been refactored accordingly.
Test file test.html has at last become a real test. Now it not only puts the
detected language name under the code snippet but also tests if it matches the
expected one. Test summary is displayed right above all language snippets.
## CDN
Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
[Link up][l]!
[yandex]: http://yandex.com/
[l]: http://softwaremaniacs.org/soft/highlight/en/download/
## Version 5.10 — "Paris".
Though I'm on a vacation in Paris, I decided to release a new version with a
couple of small fixes:
- Tomas Vitvar discovered that TAB replacement doesn't always work when used
with custom markup in code
- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
## Version 5.9
A long-awaited version is finally released.
New languages:
- Andrew Fedorov made a definition for Lua
- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
Nginx config
- [Vladimir Moskva][vm] made a definition for TeX
[pl]: http://kung-fu-tzu.ru/
[vm]: http://fulc.ru/
Fixes for existing languages:
- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
[YARD][] inline documentation
- the definition of SQL has become more solid and now it shouldn't be overly
greedy when it comes to language detection
[ls]: http://gnuu.org/
[yard]: http://yardoc.org/
The highlighter has become more usable as a library allowing to do highlighting
from initialization code of JS frameworks and in ajax methods (see.
readme.eng.txt).
Also this version drops support for the [WordPress][wp] plugin. Everyone is
welcome to [pick up its maintenance][p] if needed.
[wp]: http://wordpress.org/
[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
## Version 5.8
- Jan Berkel has contributed a definition for Scala. +1 to hotness!
- All CSS-styles are rewritten to work only inside `<pre>` tags to avoid
conflicts with host site styles.
## Version 5.7.
Fixed escaping of quotes in VBScript strings.
## Version 5.5
This version brings a small change: now .ini-files allow digits, underscores and
square brackets in key names.
## Version 5.4
Fixed small but upsetting bug in the packer which caused incorrect highlighting
of explicitly specified languages. Thanks to Andrew Fedorov for precise
diagnostics!
## Version 5.3
The version to fulfil old promises.
The most significant change is that highlight.js now preserves custom user
markup in code along with its own highlighting markup. This means that now it's
possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
[initial proposal][1] and for making a proof-of-concept patch.
Also in this version:
- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
support for CSS @-rules and Ruby symbols.
- Yura Zaripov has sent two styles: Brown Paper and School Book.
- Oleg Volchkov has sent a definition for [Parser 3][p3].
[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
[p3]: http://www.parser.ru/
[vp]: http://vasily.polovnyov.ru/
[vd]: http://dolzhenko.blogspot.com/
## Version 5.2
- at last it's possible to replace indentation TABs with something sensible
(e.g. 2 or 4 spaces)
- new keywords and built-ins for 1C by Sergey Baranov
- a couple of small fixes to Apache highlighting
## Version 5.1
This is one of those nice version consisting entirely of new and shiny
contributions!
- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
original visual style for it is now available for all highlight.js languages
under the name "Magula".
- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
the matter.
[vooon]: http://vehq.ru/about/
[rukeba]: http://rukeba.com/
[drake]: http://drakeguan.org/
[ke]: http://k-evdokimenko.moikrug.ru/
## Version 5.0
The main change in the new major version of highlight.js is a mechanism for
packing several languages along with the library itself into a single compressed
file. Now sites using several languages will load considerably faster because
the library won't dynamically include additional files while loading.
Also this version fixes a long-standing bug with Javascript highlighting that
couldn't distinguish between regular expressions and division operations.
And as usually there were a couple of minor correctness fixes.
Great thanks to all contributors! Keep using highlight.js.
## Version 4.3
This version comes with two contributions from [Jason Diamond][jd]:
- language definition for C# (yes! it was a long-missed thing!)
- Visual Studio-like highlighting style
Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
[jd]: http://jason.diamond.name/weblog/
## Version 4.2
The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
somewhat experimental meaning that for highlighting "keywords" it doesn't use
any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
in parentheses wherever it makes sense. I'd like to ask people programming in
Lisp to confirm if it's a good idea and send feedback to [the forum][f].
Other changes:
- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
test.html
- comments now allowed inside Ruby function definition
- [MEL][] language from [Shuen-Huei Guan][drake]
- whitespace now allowed between `<pre>` and `<code>`
- better auto-detection of C++ and PHP
- HTML allows embedded VBScript (`<% .. %>`)
[f]: http://softwaremaniacs.org/forum/highlightjs/
[voldmar]: http://voldmar.ya.ru/
[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
[drake]: http://drakeguan.org/
## Version 4.1
Languages:
- Bash from Vah
- DOS bat-files from Alexander Makarov (Sam)
- Diff files from Vasily Polovnyov
- Ini files from myself though initial idea was from Sam
Styles:
- Zenburn from Vladimir Epifanov, this is an imitation of a
[well-known theme for Vim][zenburn].
- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
just one color in only three gradations :-)
In other news. [One small bug][bug] was fixed, built-in keywords were added for
Python and C++ which improved auto-detection for the latter (it was shame that
[my wife's blog][alenacpp] had issues with it from time to time). And lastly
thanks go to Sam for getting rid of my stylistic comments in code that were
getting in the way of [JSMin][].
[zenburn]: http://en.wikipedia.org/wiki/Zenburn
[alenacpp]: http://alenacpp.blogspot.com/
[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
[jsmin]: http://code.google.com/p/jsmin-php/
## Version 4.0
New major version is a result of vast refactoring and of many contributions.
Visible new features:
- Highlighting of embedded languages. Currently is implemented highlighting of
Javascript and CSS inside HTML.
- Bundled 5 ready-made style themes!
Invisible new features:
- Highlight.js no longer pollutes global namespace. Only one object and one
function for backward compatibility.
- Performance is further increased by about 15%.
Changing of a major version number caused by a new format of language definition
files. If you use some third-party language files they should be updated.
## Version 3.5
A very nice version in my opinion fixing a number of small bugs and slightly
increased speed in a couple of corner cases. Thanks to everybody who reports
bugs in he [forum][f] and by email!
There is also a new language — XML. A custom XML formerly was detected as HTML
and didn't highlight custom tags. In this version I tried to make custom XML to
be detected and highlighted by its own rules. Which by the way include such
things as CDATA sections and processing instructions (`<? ... ?>`).
[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
## Version 3.3
[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
File export.html contains a little program that shows and allows to copy and
paste an HTML code generated by the highlighter for any code snippet. This can
be useful in situations when one can't use the script itself on a site.
[xonix]: http://xonixx.blogspot.com/
## Version 3.2 consists completely of contributions:
- Vladimir Gubarkov has described SmallTalk
- Yuri Ivanov has described 1C
- Peter Leonov has packaged the highlighter as a Firefox extension
- Vladimir Ermakov has compiled a mod for phpBB
Many thanks to you all!
## Version 3.1
Three new languages are available: Django templates, SQL and Axapta. The latter
two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
SQL definition but I'd never started it be it from the ground up :-)
The engine itself has got a long awaited feature of grouping keywords
("keyword", "built-in function", "literal"). No more hacks!
[1]: http://roudakov.ru/
## Version 3.0
It is major mainly because now highlight.js has grown large and has become
modular. Now when you pass it a list of languages to highlight it will
dynamically load into a browser only those languages.
Also:
- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
languages!
- Heuristics for C++ and HTML got better.
- I've implemented (at last) a correct handling of backslash escapes in C-like
languages.
There is also a small backwards incompatible change in the new version. The
function initHighlighting that was used to initialize highlighting instead of
initHighlightingOnLoad a long time ago no longer works. If you by chance still
use it — replace it with the new one.
[RibKit]: http://ribkit.sourceforge.net/
## Version 2.9
Highlight.js is a parser, not just a couple of regular expressions. That said
I'm glad to announce that in the new version 2.9 has support for:
- in-string substitutions for Ruby -- `#{...}`
- strings from from numeric symbol codes (like #XX) for Delphi
## Version 2.8
A maintenance release with more tuned heuristics. Fully backwards compatible.
## Version 2.7
- Nikita Ledyaev presents highlighting for VBScript, yay!
- A couple of bugs with escaping in strings were fixed thanks to Mickle
- Ongoing tuning of heuristics
Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
## Version 2.4
- Peter Leonov provides another improved highlighting for Perl
- Javascript gets a new kind of keywords — "literals". These are the words
"true", "false" and "null"
Also highlight.js homepage now lists sites that use the library. Feel free to
add your site by [dropping me a message][mail] until I find the time to build a
submit form.
[mail]: mailto:Maniac@SoftwareManiacs.Org
## Version 2.3
This version fixes IE breakage in previous version. My apologies to all who have
already downloaded that one!
## Version 2.2
- added highlighting for Javascript
- at last fixed parsing of Delphi's escaped apostrophes in strings
- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
Perl
## Version 2.0
- Ruby support by [Anton Kovalyov][ak]
- speed increased by orders of magnitude due to new way of parsing
- this same way allows now correct highlighting of keywords in some tricky
places (like keyword "End" at the end of Delphi classes)
[ak]: http://anton.kovalyov.net/
## Version 1.0
Version 1.0 of javascript syntax highlighter is released!
It's the first version available with English description. Feel free to post
your comments and question to [highlight.js forum][forum]. And don't be afraid
if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6

24
highlightjs/asset/LICENSE Normal file
View file

@ -0,0 +1,24 @@
Copyright (c) 2006, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

150
highlightjs/asset/README.md Normal file
View file

@ -0,0 +1,150 @@
# Highlight.js
[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
Highlight.js is a syntax highlighter written in JavaScript. It works in
the browser as well as on the server. It works with pretty much any
markup, doesnt depend on any framework and has automatic language
detection.
## Getting Started
The bare minimum for using highlight.js on a web page is linking to the
library along with one of the styles and calling
[`initHighlightingOnLoad`][1]:
```html
<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
```
This will find and highlight code inside of `<pre><code>` tags; it tries
to detect the language automatically. If automatic detection doesnt
work for you, you can specify the language in the `class` attribute:
```html
<pre><code class="html">...</code></pre>
```
The list of supported language classes is available in the [class
reference][2]. Classes can also be prefixed with either `language-` or
`lang-`.
To disable highlighting altogether use the `nohighlight` class:
```html
<pre><code class="nohighlight">...</code></pre>
```
## Custom Initialization
When you need a bit more control over the initialization of
highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
functions. This allows you to control *what* to highlight and *when*.
Heres an equivalent way to calling [`initHighlightingOnLoad`][1] using
jQuery:
```javascript
$(document).ready(function() {
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
```
You can use any tags instead of `<pre><code>` to mark up your code. If
you don't use a container that preserve line breaks you will need to
configure highlight.js to use the `<br>` tag:
```javascript
hljs.configure({useBR: true});
$('div.code').each(function(i, block) {
hljs.highlightBlock(block);
});
```
For other options refer to the documentation for [`configure`][4].
## Web Workers
You can run highlighting inside a web worker to avoid freezing the browser
window while dealing with very big chunks of code.
In your main script:
```javascript
addEventListener('load', function() {
var code = document.querySelector('#code');
var worker = new Worker('worker.js');
worker.onmessage = function(event) { code.innerHTML = event.data; }
worker.postMessage(code.textContent);
})
```
In worker.js:
```javascript
onmessage = function(event) {
importScripts('<path>/highlight.pack.js');
var result = self.hljs.highlightAuto(event.data);
postMessage(result.value);
}
```
## Getting the Library
You can get highlight.js as a hosted, or custom-build, browser script or
as a server module. Right out of the box the browser script supports
both AMD and CommonJS, so if you wish you can use RequireJS or
Browserify without having to build from source. The server module also
works perfectly fine with Browserify, but there is the option to use a
build specific to browsers rather than something meant for a server.
Head over to the [download page][5] for all the options.
**Don't link to GitHub directly.** The library is not supposed to work straight
from the source, it requires building. If none of the pre-packaged options
work for you refer to the [building documentation][6].
**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
too big. If you don't see the language you need in the ["Common" section][5],
it can be added manually:
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
```
**On Almond.** You need to use the optimizer to give the module a name. For
example:
```
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```
## License
Highlight.js is released under the BSD License. See [LICENSE][7] file
for details.
## Links
The official site for the library is at <https://highlightjs.org/>.
Further in-depth documentation for the API and other topics is at
<http://highlightjs.readthedocs.io/>.
Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
[5]: https://highlightjs.org/download/
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt

View file

@ -0,0 +1,142 @@
# Highlight.js
Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает
и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
зависит от каких-либо фреймворков и умеет автоматически определять язык.
## Начало работы
Минимум, что нужно сделать для использования highlight.js на веб-странице — это
подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
```html
<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
```
Библиотека найдёт и раскрасит код внутри тегов `<pre><code>`, попытавшись
автоматически определить язык. Когда автоопределение не срабатывает, можно явно
указать язык в атрибуте class:
```html
<pre><code class="html">...</code></pre>
```
Список поддерживаемых классов языков доступен в [справочнике по классам][2].
Класс также можно предварить префиксами `language-` или `lang-`.
Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
```html
<pre><code class="nohighlight">...</code></pre>
```
## Инициализация вручную
Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом
можно управлять тем, *что* и *когда* подсвечивать.
Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
с использованием jQuery:
```javascript
$(document).ready(function() {
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
```
Вы можете использовать любые теги разметки вместо `<pre><code>`. Если
используете контейнер, не сохраняющий переводы строк, вам нужно сказать
highlight.js использовать для них тег `<br>`:
```javascript
hljs.configure({useBR: true});
$('div.code').each(function(i, block) {
hljs.highlightBlock(block);
});
```
Другие опции можно найти в документации функции [`configure`][4].
## Web Workers
Подсветку можно запустить внутри web worker'а, чтобы окно
браузера не подтормаживало при работе с большими кусками кода.
В основном скрипте:
```javascript
addEventListener('load', function() {
var code = document.querySelector('#code');
var worker = new Worker('worker.js');
worker.onmessage = function(event) { code.innerHTML = event.data; }
worker.postMessage(code.textContent);
})
```
В worker.js:
```javascript
onmessage = function(event) {
importScripts('<path>/highlight.pack.js');
var result = self.hljs.highlightAuto(event.data);
postMessage(result.value);
}
```
## Установка библиотеки
Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
индивидуальную сборку, а также установив модуль на сервере. На
[странице загрузки][5] подробно описаны все варианты.
**Не подключайте GitHub напрямую.** Библиотека не предназначена для
использования в виде исходного кода, а требует отдельной сборки. Если вам не
подходит ни один из готовых вариантов, читайте [документацию по сборке][6].
**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера.
Если нужного вам языка нет в [категории "Common"][5], можно дообавить его
вручную:
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
```
**Про Almond.** Нужно задать имя модуля в оптимизаторе, например:
```
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```
## Лицензия
Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
[LICENSE][7].
## Ссылки
Официальный сайт билиотеки расположен по адресу <https://highlightjs.org/>.
Более подробная документация по API и другим темам расположена на
<http://highlightjs.readthedocs.io/>.
Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file.
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
[5]: https://highlightjs.org/download/
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,108 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #333;
color: white;
}
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-code,
.hljs-emphasis {
font-style: italic;
}
.hljs-tag {
color: #62c8f3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-selector-class {
color: #ade5fc;
}
.hljs-string,
.hljs-bullet {
color: #a2fca2;
}
.hljs-type,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-quote,
.hljs-built_in,
.hljs-builtin-name {
color: #ffa;
}
.hljs-number,
.hljs-symbol,
.hljs-bullet {
color: #d36363;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #fcc28c;
}
.hljs-comment,
.hljs-deletion,
.hljs-code {
color: #888;
}
.hljs-regexp,
.hljs-link {
color: #c6b4f0;
}
.hljs-meta {
color: #fc9b9b;
}
.hljs-deletion {
background-color: #fc9b9b;
color: #333;
}
.hljs-addition {
background-color: #a2fca2;
color: #333;
}
.hljs a {
color: inherit;
}
.hljs a:focus,
.hljs a:hover {
color: inherit;
text-decoration: underline;
}

View file

@ -0,0 +1,66 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/
.hljs {
color: #a9b7c6;
background: #282b2e;
display: block;
overflow-x: auto;
padding: 0.5em;
}
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
color: #6897BB;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-deletion {
color: #cc7832;
}
.hljs-variable,
.hljs-template-variable,
.hljs-link {
color: #629755;
}
.hljs-comment,
.hljs-quote {
color: #808080;
}
.hljs-meta {
color: #bbb529;
}
.hljs-string,
.hljs-attribute,
.hljs-addition {
color: #6A8759;
}
.hljs-section,
.hljs-title,
.hljs-type {
color: #ffc66d;
}
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e8bf6a;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,88 @@
/*
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #FFFFFF;
}
.hljs,
.hljs-subst {
color: #434f54;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-doctag,
.hljs-name {
color: #00979D;
}
.hljs-built_in,
.hljs-literal,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #D35400;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #00979D;
}
.hljs-type,
.hljs-string,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #005C5F;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-comment {
color: rgba(149,165,166,.8);
}
.hljs-meta-keyword {
color: #728E00;
}
.hljs-meta {
color: #728E00;
color: #434f54;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-function {
color: #728E00;
}
.hljs-number {
color: #8A7B52;
}

View file

@ -0,0 +1,73 @@
/*
Date: 17.V.2011
Author: pumbur <pumbur@pumbur.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
}
.hljs,
.hljs-subst {
color: #aaa;
}
.hljs-section {
color: #fff;
}
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #444;
}
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-regexp {
color: #ffcc33;
}
.hljs-number,
.hljs-addition {
color: #00cc66;
}
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-template-variable,
.hljs-attribute,
.hljs-link {
color: #32aaee;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #6644aa;
}
.hljs-title,
.hljs-variable,
.hljs-deletion,
.hljs-template-tag {
color: #bb1166;
}
.hljs-section,
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,45 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-symbol,
.hljs-bullet,
.hljs-section,
.hljs-addition,
.hljs-attribute,
.hljs-link {
color: #888;
}
.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #ccc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-name,
.hljs-type,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,83 @@
/* Base16 Atelier Cave Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #7e7887;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-regexp,
.hljs-link,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #19171c;
color: #8b8792;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,85 @@
/* Base16 Atelier Cave Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #655f6d;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #efecf4;
color: #585260;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #999580;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #20201d;
color: #a6a28c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #7d7a68;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #fefbec;
color: #6e6b5e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Estuary Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Estuary Comment */
.hljs-comment,
.hljs-quote {
color: #878573;
}
/* Atelier-Estuary Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ba6236;
}
/* Atelier-Estuary Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #ae7313;
}
/* Atelier-Estuary Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7d9726;
}
/* Atelier-Estuary Blue */
.hljs-title,
.hljs-section {
color: #36a166;
}
/* Atelier-Estuary Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #5f9182;
}
.hljs-deletion,
.hljs-addition {
color: #22221b;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ba6236;
}
.hljs-addition {
background-color: #7d9726;
}
.hljs {
display: block;
overflow-x: auto;
background: #22221b;
color: #929181;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Estuary Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Estuary Comment */
.hljs-comment,
.hljs-quote {
color: #6c6b5a;
}
/* Atelier-Estuary Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ba6236;
}
/* Atelier-Estuary Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #ae7313;
}
/* Atelier-Estuary Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7d9726;
}
/* Atelier-Estuary Blue */
.hljs-title,
.hljs-section {
color: #36a166;
}
/* Atelier-Estuary Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #5f9182;
}
.hljs-deletion,
.hljs-addition {
color: #22221b;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ba6236;
}
.hljs-addition {
background-color: #7d9726;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4f3ec;
color: #5f5e4e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Forest Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Forest Comment */
.hljs-comment,
.hljs-quote {
color: #9c9491;
}
/* Atelier-Forest Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #f22c40;
}
/* Atelier-Forest Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #df5320;
}
/* Atelier-Forest Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7b9726;
}
/* Atelier-Forest Blue */
.hljs-title,
.hljs-section {
color: #407ee7;
}
/* Atelier-Forest Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6666ea;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b1918;
color: #a8a19f;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Forest Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Forest Comment */
.hljs-comment,
.hljs-quote {
color: #766e6b;
}
/* Atelier-Forest Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #f22c40;
}
/* Atelier-Forest Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #df5320;
}
/* Atelier-Forest Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7b9726;
}
/* Atelier-Forest Blue */
.hljs-title,
.hljs-section {
color: #407ee7;
}
/* Atelier-Forest Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6666ea;
}
.hljs {
display: block;
overflow-x: auto;
background: #f1efee;
color: #68615e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Heath Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Heath Comment */
.hljs-comment,
.hljs-quote {
color: #9e8f9e;
}
/* Atelier-Heath Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca402b;
}
/* Atelier-Heath Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #a65926;
}
/* Atelier-Heath Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #918b3b;
}
/* Atelier-Heath Blue */
.hljs-title,
.hljs-section {
color: #516aec;
}
/* Atelier-Heath Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7b59c0;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b181b;
color: #ab9bab;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Heath Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Heath Comment */
.hljs-comment,
.hljs-quote {
color: #776977;
}
/* Atelier-Heath Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca402b;
}
/* Atelier-Heath Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #a65926;
}
/* Atelier-Heath Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #918b3b;
}
/* Atelier-Heath Blue */
.hljs-title,
.hljs-section {
color: #516aec;
}
/* Atelier-Heath Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7b59c0;
}
.hljs {
display: block;
overflow-x: auto;
background: #f7f3f7;
color: #695d69;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Lakeside Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Lakeside Comment */
.hljs-comment,
.hljs-quote {
color: #7195a8;
}
/* Atelier-Lakeside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d22d72;
}
/* Atelier-Lakeside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #935c25;
}
/* Atelier-Lakeside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #568c3b;
}
/* Atelier-Lakeside Blue */
.hljs-title,
.hljs-section {
color: #257fad;
}
/* Atelier-Lakeside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6b6bb8;
}
.hljs {
display: block;
overflow-x: auto;
background: #161b1d;
color: #7ea2b4;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Lakeside Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Lakeside Comment */
.hljs-comment,
.hljs-quote {
color: #5a7b8c;
}
/* Atelier-Lakeside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d22d72;
}
/* Atelier-Lakeside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #935c25;
}
/* Atelier-Lakeside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #568c3b;
}
/* Atelier-Lakeside Blue */
.hljs-title,
.hljs-section {
color: #257fad;
}
/* Atelier-Lakeside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6b6bb8;
}
.hljs {
display: block;
overflow-x: auto;
background: #ebf8ff;
color: #516d7b;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Plateau Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Plateau Comment */
.hljs-comment,
.hljs-quote {
color: #7e7777;
}
/* Atelier-Plateau Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca4949;
}
/* Atelier-Plateau Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b45a3c;
}
/* Atelier-Plateau Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #4b8b8b;
}
/* Atelier-Plateau Blue */
.hljs-title,
.hljs-section {
color: #7272ca;
}
/* Atelier-Plateau Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8464c4;
}
.hljs-deletion,
.hljs-addition {
color: #1b1818;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ca4949;
}
.hljs-addition {
background-color: #4b8b8b;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b1818;
color: #8a8585;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Plateau Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Plateau Comment */
.hljs-comment,
.hljs-quote {
color: #655d5d;
}
/* Atelier-Plateau Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca4949;
}
/* Atelier-Plateau Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b45a3c;
}
/* Atelier-Plateau Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #4b8b8b;
}
/* Atelier-Plateau Blue */
.hljs-title,
.hljs-section {
color: #7272ca;
}
/* Atelier-Plateau Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8464c4;
}
.hljs-deletion,
.hljs-addition {
color: #1b1818;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ca4949;
}
.hljs-addition {
background-color: #4b8b8b;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4ecec;
color: #585050;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Savanna Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Savanna Comment */
.hljs-comment,
.hljs-quote {
color: #78877d;
}
/* Atelier-Savanna Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #b16139;
}
/* Atelier-Savanna Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #9f713c;
}
/* Atelier-Savanna Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #489963;
}
/* Atelier-Savanna Blue */
.hljs-title,
.hljs-section {
color: #478c90;
}
/* Atelier-Savanna Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #55859b;
}
.hljs-deletion,
.hljs-addition {
color: #171c19;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #b16139;
}
.hljs-addition {
background-color: #489963;
}
.hljs {
display: block;
overflow-x: auto;
background: #171c19;
color: #87928a;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/* Base16 Atelier Savanna Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Savanna Comment */
.hljs-comment,
.hljs-quote {
color: #5f6d64;
}
/* Atelier-Savanna Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #b16139;
}
/* Atelier-Savanna Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #9f713c;
}
/* Atelier-Savanna Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #489963;
}
/* Atelier-Savanna Blue */
.hljs-title,
.hljs-section {
color: #478c90;
}
/* Atelier-Savanna Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #55859b;
}
.hljs-deletion,
.hljs-addition {
color: #171c19;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #b16139;
}
.hljs-addition {
background-color: #489963;
}
.hljs {
display: block;
overflow-x: auto;
background: #ecf4ee;
color: #526057;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Seaside Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Seaside Comment */
.hljs-comment,
.hljs-quote {
color: #809980;
}
/* Atelier-Seaside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e6193c;
}
/* Atelier-Seaside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #87711d;
}
/* Atelier-Seaside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #29a329;
}
/* Atelier-Seaside Blue */
.hljs-title,
.hljs-section {
color: #3d62f5;
}
/* Atelier-Seaside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #ad2bee;
}
.hljs {
display: block;
overflow-x: auto;
background: #131513;
color: #8ca68c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Seaside Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Seaside Comment */
.hljs-comment,
.hljs-quote {
color: #687d68;
}
/* Atelier-Seaside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e6193c;
}
/* Atelier-Seaside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #87711d;
}
/* Atelier-Seaside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #29a329;
}
/* Atelier-Seaside Blue */
.hljs-title,
.hljs-section {
color: #3d62f5;
}
/* Atelier-Seaside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #ad2bee;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4fbf4;
color: #5e6e5e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Sulphurpool Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Sulphurpool Comment */
.hljs-comment,
.hljs-quote {
color: #898ea4;
}
/* Atelier-Sulphurpool Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #c94922;
}
/* Atelier-Sulphurpool Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #c76b29;
}
/* Atelier-Sulphurpool Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #ac9739;
}
/* Atelier-Sulphurpool Blue */
.hljs-title,
.hljs-section {
color: #3d8fd1;
}
/* Atelier-Sulphurpool Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6679cc;
}
.hljs {
display: block;
overflow-x: auto;
background: #202746;
color: #979db4;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,69 @@
/* Base16 Atelier Sulphurpool Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Sulphurpool Comment */
.hljs-comment,
.hljs-quote {
color: #6b7394;
}
/* Atelier-Sulphurpool Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #c94922;
}
/* Atelier-Sulphurpool Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #c76b29;
}
/* Atelier-Sulphurpool Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #ac9739;
}
/* Atelier-Sulphurpool Blue */
.hljs-title,
.hljs-section {
color: #3d8fd1;
}
/* Atelier-Sulphurpool Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6679cc;
}
.hljs {
display: block;
overflow-x: auto;
background: #f5f7ff;
color: #5e6687;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,96 @@
/*
Atom One Dark by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
base: #282c34
mono-1: #abb2bf
mono-2: #818896
mono-3: #5c6370
hue-1: #56b6c2
hue-2: #61aeee
hue-3: #c678dd
hue-4: #98c379
hue-5: #e06c75
hue-5-2: #be5046
hue-6: #d19a66
hue-6-2: #e6c07b
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #abb2bf;
background: #282c34;
}
.hljs-comment,
.hljs-quote {
color: #5c6370;
font-style: italic;
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
color: #c678dd;
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #e06c75;
}
.hljs-literal {
color: #56b6c2;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #98c379;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #e6c07b;
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #d19a66;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #61aeee;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

View file

@ -0,0 +1,96 @@
/*
Atom One Light by Daniel Gamage
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
base: #fafafa
mono-1: #383a42
mono-2: #686b77
mono-3: #a0a1a7
hue-1: #0184bb
hue-2: #4078f2
hue-3: #a626a4
hue-4: #50a14f
hue-5: #e45649
hue-5-2: #c91243
hue-6: #986801
hue-6-2: #c18401
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #383a42;
background: #fafafa;
}
.hljs-comment,
.hljs-quote {
color: #a0a1a7;
font-style: italic;
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
color: #a626a4;
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #e45649;
}
.hljs-literal {
color: #0184bb;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #50a14f;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #c18401;
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #986801;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #4078f2;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

98
highlightjs/asset/styles/bootstrap.css vendored Normal file
View file

@ -0,0 +1,98 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
background: transparent;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,64 @@
/*
Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background:#b7a68e url(./brown-papersq.png);
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color:#005599;
font-weight:bold;
}
.hljs,
.hljs-subst {
color: #363c69;
}
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable,
.hljs-link,
.hljs-name {
color: #2c009f;
}
.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #802022;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,60 @@
/*
codepen.io Embed Theme
Author: Justin Perry <http://github.com/ourmaninamsterdam>
Original theme - https://github.com/chriskempson/tomorrow-theme
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
color: #fff;
}
.hljs-comment,
.hljs-quote {
color: #777;
}
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-regexp,
.hljs-meta,
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-params,
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-deletion {
color: #ab875d;
}
.hljs-section,
.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-type,
.hljs-attribute {
color: #9b869b;
}
.hljs-string,
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
color: #8f9c6c;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,71 @@
/*
Colorbrewer theme
Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org>
Ported by Fabrício Tavares de Oliveira
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
}
.hljs,
.hljs-subst {
color: #000;
}
.hljs-string,
.hljs-meta,
.hljs-symbol,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #756bb1;
}
.hljs-comment,
.hljs-quote {
color: #636363;
}
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-bullet,
.hljs-link {
color: #31a354;
}
.hljs-deletion,
.hljs-variable {
color: #88f;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-doctag,
.hljs-type,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-strong {
color: #3182bd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-attribute {
color: #e6550d;
}

View file

@ -0,0 +1,77 @@
/*
Darcula color scheme from the JetBrains family of IDEs
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #2b2b2b;
}
.hljs {
color: #bababa;
}
.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-link,
.hljs-number,
.hljs-regexp,
.hljs-literal {
color: #6896ba;
}
.hljs-code,
.hljs-selector-class {
color: #a6e22e;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-attribute,
.hljs-name,
.hljs-variable {
color: #cb7832;
}
.hljs-params {
color: #b9b9b9;
}
.hljs-string {
color: #6a8759;
}
.hljs-subst,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-symbol,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #e0c46c;
}
.hljs-comment,
.hljs-deletion,
.hljs-meta {
color: #7f7f7f;
}

View file

@ -0,0 +1,63 @@
/*
Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #444;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
color: white;
}
.hljs,
.hljs-subst {
color: #ddd;
}
.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #d88;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #777;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,6 @@
/*
Deprecated due to a typo in the name and left here for compatibility purpose only.
Please use darcula.css instead.
*/
@import url('darcula.css');

View file

@ -0,0 +1,99 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,97 @@
/*
Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #000;
background: #f8f8ff;
}
.hljs-comment,
.hljs-quote {
color: #408080;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-subst {
color: #954121;
}
.hljs-number {
color: #40a070;
}
.hljs-string,
.hljs-doctag {
color: #219161;
}
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #19469d;
}
.hljs-params {
color: #00f;
}
.hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-variable,
.hljs-template-variable {
color: #008080;
}
.hljs-regexp,
.hljs-link {
color: #b68;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,76 @@
/*
Dracula Theme v1.2.0
https://github.com/zenorocha/dracula-theme
Copyright 2015, All rights reserved
Code licensed under the MIT license
http://zenorocha.mit-license.org
@author Éverton Ribeiro <nuxlli@gmail.com>
@author Zeno Rocha <hi@zenorocha.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282a36;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
color: #8be9fd;
}
.hljs-function .hljs-keyword {
color: #ff79c6;
}
.hljs,
.hljs-subst {
color: #f8f8f2;
}
.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #f1fa8c;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #6272a4;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,71 @@
/*
FAR Style (c) MajestiC <majestic2k@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #000080;
}
.hljs,
.hljs-subst {
color: #0ff;
}
.hljs-string,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-builtin-name,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #ff0;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-variable {
color: #fff;
}
.hljs-comment,
.hljs-quote,
.hljs-doctag,
.hljs-deletion {
color: #888;
}
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
color: #0f0;
}
.hljs-meta {
color: #008080;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

88
highlightjs/asset/styles/foundation.css vendored Normal file
View file

@ -0,0 +1,88 @@
/*
Description: Foundation 4 docs style for highlight.js
Author: Dan Allen <dan.j.allen@gmail.com>
Website: http://foundation.zurb.com/docs/
Version: 1.0
Date: 2013-04-02
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #eee; color: black;
}
.hljs-link,
.hljs-emphasis,
.hljs-attribute,
.hljs-addition {
color: #070;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong,
.hljs-string,
.hljs-deletion {
color: #d14;
}
.hljs-strong {
font-weight: bold;
}
.hljs-quote,
.hljs-comment {
color: #998;
font-style: italic;
}
.hljs-section,
.hljs-title {
color: #900;
}
.hljs-class .hljs-title,
.hljs-type {
color: #458;
}
.hljs-variable,
.hljs-template-variable {
color: #336699;
}
.hljs-bullet {
color: #997700;
}
.hljs-meta {
color: #3344bb;
}
.hljs-code,
.hljs-number,
.hljs-literal,
.hljs-keyword,
.hljs-selector-tag {
color: #099;
}
.hljs-regexp {
background-color: #fff0ff;
color: #880088;
}
.hljs-symbol {
color: #990073;
}
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #007700;
}

View file

@ -0,0 +1,71 @@
/**
* GitHub Gist Theme
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
*/
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}

View file

@ -0,0 +1,99 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,89 @@
/*
Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}
.hljs-comment,
.hljs-quote {
color: #800;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-title,
.hljs-name {
color: #008;
}
.hljs-variable,
.hljs-template-variable {
color: #660;
}
.hljs-string,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-regexp {
color: #080;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-meta,
.hljs-number,
.hljs-link {
color: #066;
}
.hljs-title,
.hljs-doctag,
.hljs-type,
.hljs-attr,
.hljs-built_in,
.hljs-builtin-name,
.hljs-params {
color: #606;
}
.hljs-attribute,
.hljs-subst {
color: #000;
}
.hljs-formula {
background-color: #eee;
font-style: italic;
}
.hljs-selector-id,
.hljs-selector-class {
color: #9B703F
}
.hljs-addition {
background-color: #baeeba;
}
.hljs-deletion {
background-color: #ffc8bd;
}
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,101 @@
/*
grayscale style (c) MY Sun <simonmysun@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #fff;
}
.hljs-comment,
.hljs-quote {
color: #777;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal {
color: #777;
}
.hljs-string,
.hljs-doctag,
.hljs-formula {
color: #333;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #000;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-class .hljs-title,
.hljs-type,
.hljs-name {
color: #333;
font-weight: bold;
}
.hljs-tag {
color: #333;
}
.hljs-regexp {
color: #333;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #000;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat;
}
.hljs-built_in,
.hljs-builtin-name {
color: #000;
text-decoration: underline;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
color: #fff;
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat;
}
.hljs-addition {
color: #000;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,108 @@
/*
Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282828;
}
.hljs,
.hljs-subst {
color: #ebdbb2;
}
/* Gruvbox Red */
.hljs-deletion,
.hljs-formula,
.hljs-keyword,
.hljs-link,
.hljs-selector-tag {
color: #fb4934;
}
/* Gruvbox Blue */
.hljs-built_in,
.hljs-emphasis,
.hljs-name,
.hljs-quote,
.hljs-strong,
.hljs-title,
.hljs-variable {
color: #83a598;
}
/* Gruvbox Yellow */
.hljs-attr,
.hljs-params,
.hljs-template-tag,
.hljs-type {
color: #fabd2f;
}
/* Gruvbox Purple */
.hljs-builtin-name,
.hljs-doctag,
.hljs-literal,
.hljs-number {
color: #8f3f71;
}
/* Gruvbox Orange */
.hljs-code,
.hljs-meta,
.hljs-regexp,
.hljs-selector-id,
.hljs-template-variable {
color: #fe8019;
}
/* Gruvbox Green */
.hljs-addition,
.hljs-meta-string,
.hljs-section,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-string,
.hljs-symbol {
color: #b8bb26;
}
/* Gruvbox Aqua */
.hljs-attribute,
.hljs-bullet,
.hljs-class,
.hljs-function,
.hljs-function .hljs-keyword,
.hljs-meta-keyword,
.hljs-selector-pseudo,
.hljs-tag {
color: #8ec07c;
}
/* Gruvbox Gray */
.hljs-comment {
color: #928374;
}
/* Gruvbox Purple */
.hljs-link_label,
.hljs-literal,
.hljs-number {
color: #d3869b;
}
.hljs-comment,
.hljs-emphasis {
font-style: italic;
}
.hljs-section,
.hljs-strong,
.hljs-tag {
font-weight: bold;
}

View file

@ -0,0 +1,108 @@
/*
Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fbf1c7;
}
.hljs,
.hljs-subst {
color: #3c3836;
}
/* Gruvbox Red */
.hljs-deletion,
.hljs-formula,
.hljs-keyword,
.hljs-link,
.hljs-selector-tag {
color: #9d0006;
}
/* Gruvbox Blue */
.hljs-built_in,
.hljs-emphasis,
.hljs-name,
.hljs-quote,
.hljs-strong,
.hljs-title,
.hljs-variable {
color: #076678;
}
/* Gruvbox Yellow */
.hljs-attr,
.hljs-params,
.hljs-template-tag,
.hljs-type {
color: #b57614;
}
/* Gruvbox Purple */
.hljs-builtin-name,
.hljs-doctag,
.hljs-literal,
.hljs-number {
color: #8f3f71;
}
/* Gruvbox Orange */
.hljs-code,
.hljs-meta,
.hljs-regexp,
.hljs-selector-id,
.hljs-template-variable {
color: #af3a03;
}
/* Gruvbox Green */
.hljs-addition,
.hljs-meta-string,
.hljs-section,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-string,
.hljs-symbol {
color: #79740e;
}
/* Gruvbox Aqua */
.hljs-attribute,
.hljs-bullet,
.hljs-class,
.hljs-function,
.hljs-function .hljs-keyword,
.hljs-meta-keyword,
.hljs-selector-pseudo,
.hljs-tag {
color: #427b58;
}
/* Gruvbox Gray */
.hljs-comment {
color: #928374;
}
/* Gruvbox Purple */
.hljs-link_label,
.hljs-literal,
.hljs-number {
color: #8f3f71;
}
.hljs-comment,
.hljs-emphasis {
font-style: italic;
}
.hljs-section,
.hljs-strong,
.hljs-tag {
font-weight: bold;
}

View file

@ -0,0 +1,83 @@
/*
* Hopscotch
* by Jan T. Sott
* https://github.com/idleberg/Hopscotch
*
* This work is licensed under the Creative Commons CC0 1.0 Universal License
*/
/* Comment */
.hljs-comment,
.hljs-quote {
color: #989498;
}
/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-link,
.hljs-deletion {
color: #dd464c;
}
/* Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #fd8b19;
}
/* Yellow */
.hljs-class .hljs-title {
color: #fdcc59;
}
/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #8fc13e;
}
/* Aqua */
.hljs-meta {
color: #149b93;
}
/* Blue */
.hljs-function,
.hljs-section,
.hljs-title {
color: #1290bf;
}
/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #c85e7c;
}
.hljs {
display: block;
background: #322931;
color: #b9b5b8;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,102 @@
/*
vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
*/
/*background color*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #1d1f21;
}
/*selection color*/
.hljs::selection,
.hljs span::selection {
background: #373b41;
}
.hljs::-moz-selection,
.hljs span::-moz-selection {
background: #373b41;
}
/*foreground color*/
.hljs {
color: #c5c8c6;
}
/*color: fg_yellow*/
.hljs-title,
.hljs-name {
color: #f0c674;
}
/*color: fg_comment*/
.hljs-comment,
.hljs-meta,
.hljs-meta .hljs-keyword {
color: #707880;
}
/*color: fg_red*/
.hljs-number,
.hljs-symbol,
.hljs-literal,
.hljs-deletion,
.hljs-link {
color: #cc6666
}
/*color: fg_green*/
.hljs-string,
.hljs-doctag,
.hljs-addition,
.hljs-regexp,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #b5bd68;
}
/*color: fg_purple*/
.hljs-attribute,
.hljs-code,
.hljs-selector-id {
color: #b294bb;
}
/*color: fg_blue*/
.hljs-keyword,
.hljs-selector-tag,
.hljs-bullet,
.hljs-tag {
color: #81a2be;
}
/*color: fg_aqua*/
.hljs-subst,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #8abeb7;
}
/*color: fg_orange*/
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-quote,
.hljs-section,
.hljs-selector-class {
color: #de935f;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,97 @@
/*
Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #000;
background: #fff;
}
.hljs-subst,
.hljs-title {
font-weight: normal;
color: #000;
}
.hljs-comment,
.hljs-quote {
color: #808080;
font-style: italic;
}
.hljs-meta {
color: #808000;
}
.hljs-tag {
background: #efefef;
}
.hljs-section,
.hljs-name,
.hljs-literal,
.hljs-keyword,
.hljs-selector-tag,
.hljs-type,
.hljs-selector-id,
.hljs-selector-class {
font-weight: bold;
color: #000080;
}
.hljs-attribute,
.hljs-number,
.hljs-regexp,
.hljs-link {
font-weight: bold;
color: #0000ff;
}
.hljs-number,
.hljs-regexp,
.hljs-link {
font-weight: normal;
}
.hljs-string {
color: #008000;
font-weight: bold;
}
.hljs-symbol,
.hljs-bullet,
.hljs-formula {
color: #000;
background: #d0eded;
font-style: italic;
}
.hljs-doctag {
text-decoration: underline;
}
.hljs-variable,
.hljs-template-variable {
color: #660e7a;
}
.hljs-addition {
background: #baeeba;
}
.hljs-deletion {
background: #ffc8bd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,73 @@
/*
IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #000;
color: #f8f8f8;
}
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #7c7c7c;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-tag,
.hljs-name {
color: #96cbfe;
}
.hljs-attribute,
.hljs-selector-id {
color: #ffffb6;
}
.hljs-string,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition {
color: #a8ff60;
}
.hljs-subst {
color: #daefa3;
}
.hljs-regexp,
.hljs-link {
color: #e9c062;
}
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-doctag {
color: #ffffb6;
}
.hljs-symbol,
.hljs-bullet,
.hljs-variable,
.hljs-template-variable,
.hljs-literal {
color: #c6c5fe;
}
.hljs-number,
.hljs-deletion {
color:#ff73fd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,74 @@
/*
Name: Kimbie (dark)
Author: Jan T. Sott
License: Creative Commons Attribution-ShareAlike 4.0 Unported License
URL: https://github.com/idleberg/Kimbie-highlight.js
*/
/* Kimbie Comment */
.hljs-comment,
.hljs-quote {
color: #d6baad;
}
/* Kimbie Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-meta {
color: #dc3958;
}
/* Kimbie Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-deletion,
.hljs-link {
color: #f79a32;
}
/* Kimbie Yellow */
.hljs-title,
.hljs-section,
.hljs-attribute {
color: #f06431;
}
/* Kimbie Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #889b4a;
}
/* Kimbie Purple */
.hljs-keyword,
.hljs-selector-tag,
.hljs-function {
color: #98676a;
}
.hljs {
display: block;
overflow-x: auto;
background: #221a0f;
color: #d3af86;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,74 @@
/*
Name: Kimbie (light)
Author: Jan T. Sott
License: Creative Commons Attribution-ShareAlike 4.0 Unported License
URL: https://github.com/idleberg/Kimbie-highlight.js
*/
/* Kimbie Comment */
.hljs-comment,
.hljs-quote {
color: #a57a4c;
}
/* Kimbie Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-meta {
color: #dc3958;
}
/* Kimbie Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-deletion,
.hljs-link {
color: #f79a32;
}
/* Kimbie Yellow */
.hljs-title,
.hljs-section,
.hljs-attribute {
color: #f06431;
}
/* Kimbie Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #889b4a;
}
/* Kimbie Purple */
.hljs-keyword,
.hljs-selector-tag,
.hljs-function {
color: #98676a;
}
.hljs {
display: block;
overflow-x: auto;
background: #fbebd4;
color: #84613d;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,70 @@
/*
Description: Magula style for highligh.js
Author: Ruslan Keba <rukeba@gmail.com>
Website: http://rukeba.com/
Version: 1.0
Date: 2009-01-03
Music: Aphex Twin / Xtal
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background-color: #f4f4f4;
}
.hljs,
.hljs-subst {
color: black;
}
.hljs-string,
.hljs-title,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #050;
}
.hljs-comment,
.hljs-quote {
color: #777;
}
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-type,
.hljs-link {
color: #800;
}
.hljs-deletion,
.hljs-meta {
color: #00e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-tag,
.hljs-name {
font-weight: bold;
color: navy;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,59 @@
/*
Five-color theme from a single blue hue.
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #eaeef3;
}
.hljs {
color: #00193a;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-comment {
color: #738191;
}
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-literal,
.hljs-type,
.hljs-addition,
.hljs-tag,
.hljs-quote,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #0048ab;
}
.hljs-meta,
.hljs-subst,
.hljs-symbol,
.hljs-regexp,
.hljs-attribute,
.hljs-deletion,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-bullet {
color: #4c81c9;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,83 @@
/*
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #23241f;
}
.hljs,
.hljs-tag,
.hljs-subst {
color: #f8f8f2;
}
.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
color: #ae81ff;
}
.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
color: #a6e22e;
}
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
color: #f92672;
}
.hljs-symbol,
.hljs-attribute {
color: #66d9ef;
}
.hljs-params,
.hljs-class .hljs-title {
color: #f8f8f2;
}
.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
color: #e6db74;
}
.hljs-comment,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}

View file

@ -0,0 +1,70 @@
/*
Monokai style - ported by Luigi Maselli - http://grigio.org
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #272822; color: #ddd;
}
.hljs-tag,
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-strong,
.hljs-name {
color: #f92672;
}
.hljs-code {
color: #66d9ef;
}
.hljs-class .hljs-title {
color: white;
}
.hljs-attribute,
.hljs-symbol,
.hljs-regexp,
.hljs-link {
color: #bf79db;
}
.hljs-string,
.hljs-bullet,
.hljs-subst,
.hljs-title,
.hljs-section,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #a6e22e;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #75715e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-selector-id {
font-weight: bold;
}

View file

@ -0,0 +1,88 @@
/**
* Obsidian style
* ported by Alexander Marenin (http://github.com/ioncreature)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282b2e;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-selector-id {
color: #93c763;
}
.hljs-number {
color: #ffcd22;
}
.hljs {
color: #e0e2e4;
}
.hljs-attribute {
color: #668bb0;
}
.hljs-code,
.hljs-class .hljs-title,
.hljs-section {
color: white;
}
.hljs-regexp,
.hljs-link {
color: #d39745;
}
.hljs-meta {
color: #557182;
}
.hljs-tag,
.hljs-name,
.hljs-bullet,
.hljs-subst,
.hljs-emphasis,
.hljs-type,
.hljs-built_in,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #8cbbad;
}
.hljs-string,
.hljs-symbol {
color: #ec7600;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion {
color: #818e96;
}
.hljs-selector-class {
color: #A082BD
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,74 @@
/* Ocean Dark Theme */
/* https://github.com/gavsiu */
/* Original theme - https://github.com/chriskempson/base16 */
/* Ocean Comment */
.hljs-comment,
.hljs-quote {
color: #65737e;
}
/* Ocean Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #bf616a;
}
/* Ocean Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #d08770;
}
/* Ocean Yellow */
.hljs-attribute {
color: #ebcb8b;
}
/* Ocean Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #a3be8c;
}
/* Ocean Blue */
.hljs-title,
.hljs-section {
color: #8fa1b3;
}
/* Ocean Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b48ead;
}
.hljs {
display: block;
overflow-x: auto;
background: #2b303b;
color: #c0c5ce;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,72 @@
/*
Paraíso (dark)
Created by Jan T. Sott (http://github.com/idleberg)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
/* Paraíso Comment */
.hljs-comment,
.hljs-quote {
color: #8d8687;
}
/* Paraíso Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-link,
.hljs-meta {
color: #ef6155;
}
/* Paraíso Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-deletion {
color: #f99b15;
}
/* Paraíso Yellow */
.hljs-title,
.hljs-section,
.hljs-attribute {
color: #fec418;
}
/* Paraíso Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #48b685;
}
/* Paraíso Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #815ba4;
}
.hljs {
display: block;
overflow-x: auto;
background: #2f1e2e;
color: #a39e9b;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,72 @@
/*
Paraíso (light)
Created by Jan T. Sott (http://github.com/idleberg)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
/* Paraíso Comment */
.hljs-comment,
.hljs-quote {
color: #776e71;
}
/* Paraíso Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-link,
.hljs-meta {
color: #ef6155;
}
/* Paraíso Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-deletion {
color: #f99b15;
}
/* Paraíso Yellow */
.hljs-title,
.hljs-section,
.hljs-attribute {
color: #fec418;
}
/* Paraíso Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #48b685;
}
/* Paraíso Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #815ba4;
}
.hljs {
display: block;
overflow-x: auto;
background: #e7e9db;
color: #4f424c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,83 @@
/*
Pojoaque Style by Jason Tate
http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
Based on Solarized Style from http://ethanschoonover.com/solarized
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #dccf8f;
background: url(./pojoaque.jpg) repeat scroll left top #181914;
}
.hljs-comment,
.hljs-quote {
color: #586e75;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-addition {
color: #b64926;
}
.hljs-number,
.hljs-string,
.hljs-doctag,
.hljs-regexp {
color: #468966;
}
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-name {
color: #ffb03b;
}
.hljs-variable,
.hljs-template-variable,
.hljs-class .hljs-title,
.hljs-type,
.hljs-tag {
color: #b58900;
}
.hljs-attribute {
color: #b89859;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-subst,
.hljs-meta {
color: #cb4b16;
}
.hljs-deletion {
color: #dc322f;
}
.hljs-selector-id,
.hljs-selector-class {
color: #d3a60c;
}
.hljs-formula {
background: #073642;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,96 @@
/*
PureBASIC native IDE style ( version 1.0 - April 2016 )
by Tristano Ajmone <tajmone@gmail.com>
Public Domain
NOTE_1: PureBASIC code syntax highlighting only applies the following classes:
.hljs-comment
.hljs-function
.hljs-keywords
.hljs-string
.hljs-symbol
Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style.
If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by
a "--- used for PureBASIC ... ---" comment on same line.
NOTE_2: Color names provided in comments were derived using "Name that Color" online tool:
http://chir.ag/projects/name-that-color
*/
.hljs { /* Common set of rules required by highlight.js (don'r remove!) */
display: block;
overflow-x: auto;
padding: 0.5em;
background: #FFFFDF; /* Half and Half (approx.) */
/* --- Uncomment to add PureBASIC native IDE styled font!
font-family: Consolas;
*/
}
.hljs, /* --- used for PureBASIC base color --- */
.hljs-type, /* --- used for PureBASIC Procedures return type --- */
.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */
.hljs-name,
.hljs-number,
.hljs-attr,
.hljs-params,
.hljs-subst {
color: #000000; /* Black */
}
.hljs-comment, /* --- used for PureBASIC Comments --- */
.hljs-regexp,
.hljs-section,
.hljs-selector-pseudo,
.hljs-addition {
color: #00AAAA; /* Persian Green (approx.) */
}
.hljs-title, /* --- used for PureBASIC Procedures Names --- */
.hljs-tag,
.hljs-variable,
.hljs-code {
color: #006666; /* Blue Stone (approx.) */
}
.hljs-keyword, /* --- used for PureBASIC Keywords --- */
.hljs-class,
.hljs-meta-keyword,
.hljs-selector-class,
.hljs-built_in,
.hljs-builtin-name {
color: #006666; /* Blue Stone (approx.) */
font-weight: bold;
}
.hljs-string, /* --- used for PureBASIC Strings --- */
.hljs-selector-attr {
color: #0080FF; /* Azure Radiance (approx.) */
}
.hljs-symbol, /* --- used for PureBASIC Constants --- */
.hljs-link,
.hljs-deletion,
.hljs-attribute {
color: #924B72; /* Cannon Pink (approx.) */
}
.hljs-meta,
.hljs-literal,
.hljs-selector-id {
color: #924B72; /* Cannon Pink (approx.) */
font-weight: bold;
}
.hljs-strong,
.hljs-name {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,83 @@
/*
Qt Creator dark color scheme
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #000000;
}
.hljs,
.hljs-subst,
.hljs-tag,
.hljs-title {
color: #aaaaaa;
}
.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal {
color: #ff55ff;
}
.hljs-code
.hljs-selector-class {
color: #aaaaff;
}
.hljs-emphasis,
.hljs-stronge,
.hljs-type {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-function,
.hljs-section,
.hljs-symbol,
.hljs-name {
color: #ffff55;
}
.hljs-attribute {
color: #ff5555;
}
.hljs-variable,
.hljs-params,
.hljs-class .hljs-title {
color: #8888ff;
}
.hljs-string,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition,
.hljs-link {
color: #ff55ff;
}
.hljs-comment,
.hljs-meta,
.hljs-deletion {
color: #55ffff;
}

View file

@ -0,0 +1,83 @@
/*
Qt Creator light color scheme
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #ffffff;
}
.hljs,
.hljs-subst,
.hljs-tag,
.hljs-title {
color: #000000;
}
.hljs-strong,
.hljs-emphasis {
color: #000000;
}
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal {
color: #000080;
}
.hljs-code
.hljs-selector-class {
color: #800080;
}
.hljs-emphasis,
.hljs-stronge,
.hljs-type {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-function,
.hljs-section,
.hljs-symbol,
.hljs-name {
color: #808000;
}
.hljs-attribute {
color: #800000;
}
.hljs-variable,
.hljs-params,
.hljs-class .hljs-title {
color: #0055AF;
}
.hljs-string,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition,
.hljs-link {
color: #008000;
}
.hljs-comment,
.hljs-meta,
.hljs-deletion {
color: #008000;
}

View file

@ -0,0 +1,106 @@
/*
Railscasts-like style (c) Visoft, Inc. (Damien White)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #232323;
color: #e6e1dc;
}
.hljs-comment,
.hljs-quote {
color: #bc9458;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag {
color: #c26230;
}
.hljs-string,
.hljs-number,
.hljs-regexp,
.hljs-variable,
.hljs-template-variable {
color: #a5c261;
}
.hljs-subst {
color: #519f50;
}
.hljs-tag,
.hljs-name {
color: #e8bf6a;
}
.hljs-type {
color: #da4939;
}
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-builtin-name,
.hljs-attr,
.hljs-link {
color: #6d9cbe;
}
.hljs-params {
color: #d0d0ff;
}
.hljs-attribute {
color: #cda869;
}
.hljs-meta {
color: #9b859d;
}
.hljs-title,
.hljs-section {
color: #ffc66d;
}
.hljs-addition {
background-color: #144212;
color: #e6e1dc;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #600;
color: #e6e1dc;
display: inline-block;
width: 100%;
}
.hljs-selector-class {
color: #9b703f;
}
.hljs-selector-id {
color: #8b98ab;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

View file

@ -0,0 +1,85 @@
/*
Style with support for rainbow parens
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #474949;
color: #d1d9e1;
}
.hljs-comment,
.hljs-quote {
color: #969896;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-type,
.hljs-addition {
color: #cc99cc;
}
.hljs-number,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #f99157;
}
.hljs-string,
.hljs-doctag,
.hljs-regexp {
color: #8abeb7;
}
.hljs-title,
.hljs-name,
.hljs-section,
.hljs-built_in {
color: #b5bd68;
}
.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-class .hljs-title {
color: #ffcc66;
}
.hljs-section,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-link {
color: #f99157;
}
.hljs-deletion {
color: #dc322f;
}
.hljs-formula {
background: #eee8d5;
}
.hljs-attr,
.hljs-attribute {
color: #81a2be;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,108 @@
/*
highlight.js style for Microtik RouterOS script
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
.hljs-attribute {
color: #0E9A00;
}
.hljs-function {
color: #99069A;
}
.hljs-builtin-name {
color: #99069A;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #0C9A9A;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,72 @@
/*
School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 15px 0.5em 0.5em 30px;
font-size: 11px;
line-height:16px;
}
pre{
background:#f6f6ae url(./school-book.png);
border-top: solid 2px #d2e8b9;
border-bottom: solid 1px #d2e8b9;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color:#005599;
font-weight:bold;
}
.hljs,
.hljs-subst {
color: #3e5915;
}
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute,
.hljs-built_in,
.hljs-builtin-name,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable,
.hljs-link {
color: #2c009f;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #e60415;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-selector-id,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

View file

@ -0,0 +1,84 @@
/*
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #002b36;
color: #839496;
}
.hljs-comment,
.hljs-quote {
color: #586e75;
}
/* Solarized Green */
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
color: #859900;
}
/* Solarized Cyan */
.hljs-number,
.hljs-string,
.hljs-meta .hljs-meta-string,
.hljs-literal,
.hljs-doctag,
.hljs-regexp {
color: #2aa198;
}
/* Solarized Blue */
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #268bd2;
}
/* Solarized Yellow */
.hljs-attribute,
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-class .hljs-title,
.hljs-type {
color: #b58900;
}
/* Solarized Orange */
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-link {
color: #cb4b16;
}
/* Solarized Red */
.hljs-built_in,
.hljs-deletion {
color: #dc322f;
}
.hljs-formula {
background: #073642;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,84 @@
/*
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fdf6e3;
color: #657b83;
}
.hljs-comment,
.hljs-quote {
color: #93a1a1;
}
/* Solarized Green */
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
color: #859900;
}
/* Solarized Cyan */
.hljs-number,
.hljs-string,
.hljs-meta .hljs-meta-string,
.hljs-literal,
.hljs-doctag,
.hljs-regexp {
color: #2aa198;
}
/* Solarized Blue */
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #268bd2;
}
/* Solarized Yellow */
.hljs-attribute,
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-class .hljs-title,
.hljs-type {
color: #b58900;
}
/* Solarized Orange */
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-link {
color: #cb4b16;
}
/* Solarized Red */
.hljs-built_in,
.hljs-deletion {
color: #dc322f;
}
.hljs-formula {
background: #eee8d5;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,102 @@
/*
Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #000;
color: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #aeaeae;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #e28964;
}
.hljs-string {
color: #65b042;
}
.hljs-subst {
color: #daefa3;
}
.hljs-regexp,
.hljs-link {
color: #e9c062;
}
.hljs-title,
.hljs-section,
.hljs-tag,
.hljs-name {
color: #89bdff;
}
.hljs-class .hljs-title,
.hljs-doctag {
text-decoration: underline;
}
.hljs-symbol,
.hljs-bullet,
.hljs-number {
color: #3387cc;
}
.hljs-params,
.hljs-variable,
.hljs-template-variable {
color: #3e87e3;
}
.hljs-attribute {
color: #cda869;
}
.hljs-meta {
color: #8996a8;
}
.hljs-formula {
background-color: #0e2231;
color: #f8f8f8;
font-style: italic;
}
.hljs-addition {
background-color: #253b22;
color: #f8f8f8;
}
.hljs-deletion {
background-color: #420e09;
color: #f8f8f8;
}
.hljs-selector-class {
color: #9b703f;
}
.hljs-selector-id {
color: #8b98ab;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,75 @@
/* Tomorrow Night Blue Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #7285b7;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #ff9da4;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #ffc58f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #ffeead;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #d1f1a9;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #bbdaff;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #ebbbff;
}
.hljs {
display: block;
overflow-x: auto;
background: #002451;
color: white;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,74 @@
/* Tomorrow Night Bright Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #969896;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #d54e53;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #e78c45;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #e7c547;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #b9ca4a;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #7aa6da;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #c397d8;
}
.hljs {
display: block;
overflow-x: auto;
background: black;
color: #eaeaea;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,74 @@
/* Tomorrow Night Eighties Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #999999;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #f2777a;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f99157;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #ffcc66;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #99cc99;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #6699cc;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #cc99cc;
}
.hljs {
display: block;
overflow-x: auto;
background: #2d2d2d;
color: #cccccc;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,75 @@
/* Tomorrow Night Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #969896;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #cc6666;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #de935f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #f0c674;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #b5bd68;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #81a2be;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b294bb;
}
.hljs {
display: block;
overflow-x: auto;
background: #1d1f21;
color: #c5c8c6;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,72 @@
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
color: #8e908c;
}
/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
color: #c82829;
}
/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
color: #f5871f;
}
/* Tomorrow Yellow */
.hljs-attribute {
color: #eab700;
}
/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
color: #718c00;
}
/* Tomorrow Blue */
.hljs-title,
.hljs-section {
color: #4271ae;
}
/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8959a8;
}
.hljs {
display: block;
overflow-x: auto;
background: white;
color: #4d4d4c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,68 @@
/*
Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}
.hljs-comment,
.hljs-quote,
.hljs-variable {
color: #008000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-built_in,
.hljs-name,
.hljs-tag {
color: #00f;
}
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-literal,
.hljs-template-tag,
.hljs-template-variable,
.hljs-type,
.hljs-addition {
color: #a31515;
}
.hljs-deletion,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-meta {
color: #2b91af;
}
.hljs-doctag {
color: #808080;
}
.hljs-attr {
color: #f00;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #00b0e8;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,115 @@
/*
* Visual Studio 2015 dark style
* Author: Nicolas LLOBERA <nllobera@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #1E1E1E;
color: #DCDCDC;
}
.hljs-keyword,
.hljs-literal,
.hljs-symbol,
.hljs-name {
color: #569CD6;
}
.hljs-link {
color: #569CD6;
text-decoration: underline;
}
.hljs-built_in,
.hljs-type {
color: #4EC9B0;
}
.hljs-number,
.hljs-class {
color: #B8D7A3;
}
.hljs-string,
.hljs-meta-string {
color: #D69D85;
}
.hljs-regexp,
.hljs-template-tag {
color: #9A5334;
}
.hljs-subst,
.hljs-function,
.hljs-title,
.hljs-params,
.hljs-formula {
color: #DCDCDC;
}
.hljs-comment,
.hljs-quote {
color: #57A64A;
font-style: italic;
}
.hljs-doctag {
color: #608B4E;
}
.hljs-meta,
.hljs-meta-keyword,
.hljs-tag {
color: #9B9B9B;
}
.hljs-variable,
.hljs-template-variable {
color: #BD63C5;
}
.hljs-attr,
.hljs-attribute,
.hljs-builtin-name {
color: #9CDCFE;
}
.hljs-section {
color: gold;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
/*.hljs-code {
font-family:'Monospace';
}*/
.hljs-bullet,
.hljs-selector-tag,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #D7BA7D;
}
.hljs-addition {
background-color: #144212;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #600;
display: inline-block;
width: 100%;
}

View file

@ -0,0 +1,93 @@
/*
XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
color: black;
}
.hljs-comment,
.hljs-quote {
color: #006a00;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #aa0d91;
}
.hljs-name {
color: #008;
}
.hljs-variable,
.hljs-template-variable {
color: #660;
}
.hljs-string {
color: #c41a16;
}
.hljs-regexp,
.hljs-link {
color: #080;
}
.hljs-title,
.hljs-tag,
.hljs-symbol,
.hljs-bullet,
.hljs-number,
.hljs-meta {
color: #1c00cf;
}
.hljs-section,
.hljs-class .hljs-title,
.hljs-type,
.hljs-attr,
.hljs-built_in,
.hljs-builtin-name,
.hljs-params {
color: #5c2699;
}
.hljs-attribute,
.hljs-subst {
color: #000;
}
.hljs-formula {
background-color: #eee;
font-style: italic;
}
.hljs-addition {
background-color: #baeeba;
}
.hljs-deletion {
background-color: #ffc8bd;
}
.hljs-selector-id,
.hljs-selector-class {
color: #9b703f;
}
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View file

@ -0,0 +1,92 @@
/*
xt256.css
Contact: initbar [at] protonmail [dot] ch
: github.com/initbar
*/
.hljs {
display: block;
overflow-x: auto;
color: #eaeaea;
background: #000;
padding: 0.5;
}
.hljs-subst {
color: #eaeaea;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-builtin-name,
.hljs-type {
color: #eaeaea;
}
.hljs-params {
color: #da0000;
}
.hljs-literal,
.hljs-number,
.hljs-name {
color: #ff0000;
font-weight: bolder;
}
.hljs-comment {
color: #969896;
}
.hljs-selector-id,
.hljs-quote {
color: #00ffff;
}
.hljs-template-variable,
.hljs-variable,
.hljs-title {
color: #00ffff;
font-weight: bold;
}
.hljs-selector-class,
.hljs-keyword,
.hljs-symbol {
color: #fff000;
}
.hljs-string,
.hljs-bullet {
color: #00ff00;
}
.hljs-tag,
.hljs-section {
color: #000fff;
}
.hljs-selector-tag {
color: #000fff;
font-weight: bold;
}
.hljs-attribute,
.hljs-built_in,
.hljs-regexp,
.hljs-link {
color: #ff00ff;
}
.hljs-meta {
color: #fff;
font-weight: bolder;
}

View file

@ -0,0 +1,80 @@
/*
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
based on dark.css by Ivan Sagalaev
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #3f3f3f;
color: #dcdcdc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-tag {
color: #e3ceab;
}
.hljs-template-tag {
color: #dcdcdc;
}
.hljs-number {
color: #8cd0d3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-attribute {
color: #efdcbc;
}
.hljs-literal {
color: #efefaf;
}
.hljs-subst {
color: #8f8f8f;
}
.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #efef8f;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link {
color: #dca3a3;
}
.hljs-deletion,
.hljs-string,
.hljs-built_in,
.hljs-builtin-name {
color: #cc9393;
}
.hljs-addition,
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #7f9f7f;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,6 @@
hljs.initHighlightingOnLoad();
document.addEventListener('postprocess_liveupdate', function () {
var blocks = document.querySelectorAll('pre code:not(.hljs)');
Array.prototype.forEach.call(blocks, hljs.highlightBlock);
});

View file

@ -0,0 +1,39 @@
<?php
/**
* Name: Syntax Highlighting
* Description: Highlights syntax of code blocks with highlight.js
* Version: 1.0
* Author: Hypolite Petovan <hypolite@mrpetovan.com>
*/
use Friendica\App;
use Friendica\Core\Addon;
function highlightjs_install()
{
Addon::registerHook('head' , __FILE__, 'highlightjs_head');
Addon::registerHook('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_uninstall()
{
Addon::unregisterHook('head' , __FILE__, 'highlightjs_head');
Addon::unregisterHook('footer', __FILE__, 'highlightjs_footer');
}
function highlightjs_head(App $a, &$b)
{
if ($a->getCurrentTheme() == 'frio') {
$style = 'bootstrap';
} else {
$style = 'default';
}
$a->registerStylesheet(__DIR__ . '/asset/styles/' . $style . '.css');
}
function highlightjs_footer(App $a, &$b)
{
$a->registerFooterScript(__DIR__ . '/asset/highlight.pack.js');
$a->registerFooterScript(__DIR__ . '/highlightjs.js');
}

View file

@ -13,10 +13,12 @@ require_once 'include/text.php';
use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
use Friendica\Model\Item;
use Friendica\Util\Strings;
function ifttt_install()
{
@ -49,7 +51,7 @@ function ifttt_settings(App $a, &$s)
$key = PConfig::get(local_user(), 'ifttt', 'key');
if (!$key) {
$key = random_string(20);
$key = Strings::getRandomHex(20);
PConfig::set(local_user(), 'ifttt', 'key', $key);
}
@ -64,7 +66,7 @@ function ifttt_settings(App $a, &$s)
$s .= '<div id="ifttt-configuration-wrapper">';
$s .= '<p>' . L10n::t('Create an account at <a href="http://www.ifttt.com">IFTTT</a>. Create three Facebook recipes that are connected with <a href="https://ifttt.com/maker">Maker</a> (In the form "if Facebook then Maker") with the following parameters:') . '</p>';
$s .= '<h4>URL</h4>';
$s .= '<p>' . $a->get_baseurl() . '/ifttt/' . $a->user['nickname'] . '</p>';
$s .= '<p>' . $a->getBaseURL() . '/ifttt/' . $a->user['nickname'] . '</p>';
$s .= '<h4>Method</h4>';
$s .= '<p>POST</p>';
$s .= '<h4>Content Type</h4>';
@ -88,7 +90,7 @@ function ifttt_settings(App $a, &$s)
function ifttt_settings_post()
{
if (x($_POST, 'ifttt-submit') && isset($_POST['ifttt-rekey'])) {
if (!empty($_POST['ifttt-submit']) && isset($_POST['ifttt-rekey'])) {
PConfig::delete(local_user(), 'ifttt', 'key');
}
}
@ -103,16 +105,16 @@ function ifttt_post(App $a)
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname]);
if (!DBA::isResult($user)) {
logger('User ' . $nickname . ' not found.', LOGGER_DEBUG);
Logger::log('User ' . $nickname . ' not found.', Logger::DEBUG);
return;
}
$uid = $user['uid'];
logger('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true), LOGGER_DEBUG);
Logger::log('Received a post for user ' . $uid . ' from ifttt ' . print_r($_REQUEST, true), Logger::DEBUG);
if (!isset($_REQUEST['key'])) {
logger('No key found.');
Logger::log('No key found.');
return;
}
@ -120,7 +122,7 @@ function ifttt_post(App $a)
// Check the key
if ($key != PConfig::get($uid, 'ifttt', 'key')) {
logger('Invalid key for user ' . $uid, LOGGER_DEBUG);
Logger::log('Invalid key for user ' . $uid, Logger::DEBUG);
return;
}
@ -131,7 +133,7 @@ function ifttt_post(App $a)
}
if (!in_array($item['type'], ['status', 'link', 'photo'])) {
logger('Unknown item type ' . $item['type'], LOGGER_DEBUG);
Logger::log('Unknown item type ' . $item['type'], Logger::DEBUG);
return;
}
@ -180,7 +182,7 @@ function ifttt_message($uid, $item)
//$_REQUEST['date'] = $item['date'];
//$_REQUEST['uri'] = $item['url'];
if (strstr($item['url'], 'facebook.com')) {
if (!empty($item['url']) && strstr($item['url'], 'facebook.com')) {
$hash = hash('ripemd128', $item['url']);
$_REQUEST['extid'] = Protocol::FACEBOOK;
$_REQUEST['message_id'] = Item::newURI($uid, Protocol::FACEBOOK . ':' . $hash);

View file

@ -11,155 +11,159 @@
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
function ijpost_install() {
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_uninstall() {
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
function ijpost_install()
{
Addon::registerHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::registerHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::registerHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::registerHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::registerHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_jot_nets(&$a,&$b) {
if(! local_user())
return;
$ij_post = PConfig::get(local_user(),'ijpost','post');
if(intval($ij_post) == 1) {
$ij_defpost = PConfig::get(local_user(),'ijpost','post_by_default');
$selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="ijpost_enable" ' . $selected . ' value="1" /> '
. L10n::t('Post to Insanejournal') . '</div>';
}
function ijpost_uninstall()
{
Addon::unregisterHook('post_local', 'addon/ijpost/ijpost.php', 'ijpost_post_local');
Addon::unregisterHook('notifier_normal', 'addon/ijpost/ijpost.php', 'ijpost_send');
Addon::unregisterHook('jot_networks', 'addon/ijpost/ijpost.php', 'ijpost_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/ijpost/ijpost.php', 'ijpost_settings');
Addon::unregisterHook('connector_settings_post', 'addon/ijpost/ijpost.php', 'ijpost_settings_post');
}
function ijpost_jot_nets(&$a, &$b)
{
if (!local_user()) {
return;
}
function ijpost_settings(&$a,&$s) {
$ij_post = PConfig::get(local_user(), 'ijpost', 'post');
if (intval($ij_post) == 1) {
$ij_defpost = PConfig::get(local_user(), 'ijpost', 'post_by_default');
$selected = ((intval($ij_defpost) == 1) ? ' checked="checked" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="ijpost_enable" ' . $selected . ' value="1" /> '
. L10n::t('Post to Insanejournal') . '</div>';
}
}
if(! local_user())
return;
function ijpost_settings(&$a, &$s)
{
if (!local_user()) {
return;
}
/* Add our stylesheet to the page so we can make our settings look nice */
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/ijpost/ijpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(),'ijpost','post');
$enabled = PConfig::get(local_user(), 'ijpost', 'post');
$checked = (($enabled) ? ' checked="checked" ' : '');
$checked = (($enabled) ? ' checked="checked" ' : '');
$def_enabled = PConfig::get(local_user(),'ijpost','post_by_default');
$def_enabled = PConfig::get(local_user(), 'ijpost', 'post_by_default');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
$def_checked = (($def_enabled) ? ' checked="checked" ' : '');
$ij_username = PConfig::get(local_user(), 'ijpost', 'ij_username');
$ij_password = PConfig::get(local_user(), 'ijpost', 'ij_password');
/* Add some HTML to the existing form */
$s .= '<span id="settings_ijpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '</span>';
$s .= '<div id="settings_ijpost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '</span>';
/* Add some HTML to the existing form */
$s .= '<span id="settings_ijpost_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '</span>';
$s .= '<div id="settings_ijpost_expanded" class="settings-block" style="display: none;">';
$s .= '<span class="fakelink" onclick="openClose(\'settings_ijpost_expanded\'); openClose(\'settings_ijpost_inflated\');">';
$s .= '<img class="connector" src="images/insanejournal.gif" /><h3 class="connector">'. L10n::t("InsaneJournal Export").'</h3>';
$s .= '</span>';
$s .= '<div id="ijpost-enable-wrapper">';
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . L10n::t('Enable InsaneJournal Post Addon') . '</label>';
$s .= '<input id="ijpost-checkbox" type="checkbox" name="ijpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-enable-wrapper">';
$s .= '<label id="ijpost-enable-label" for="ijpost-checkbox">' . L10n::t('Enable InsaneJournal Post Addon') . '</label>';
$s .= '<input id="ijpost-checkbox" type="checkbox" name="ijpost" value="1" ' . $checked . '/>';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-username-wrapper">';
$s .= '<label id="ijpost-username-label" for="ijpost-username">' . L10n::t('InsaneJournal username') . '</label>';
$s .= '<input id="ijpost-username" type="text" name="ij_username" value="' . $ij_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-username-wrapper">';
$s .= '<label id="ijpost-username-label" for="ijpost-username">' . L10n::t('InsaneJournal username') . '</label>';
$s .= '<input id="ijpost-username" type="text" name="ij_username" value="' . $ij_username . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-password-wrapper">';
$s .= '<label id="ijpost-password-label" for="ijpost-password">' . L10n::t('InsaneJournal password') . '</label>';
$s .= '<input id="ijpost-password" type="password" name="ij_password" value="' . $ij_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-password-wrapper">';
$s .= '<label id="ijpost-password-label" for="ijpost-password">' . L10n::t('InsaneJournal password') . '</label>';
$s .= '<input id="ijpost-password" type="password" name="ij_password" value="' . $ij_password . '" />';
$s .= '</div><div class="clear"></div>';
$s .= '<div id="ijpost-bydefault-wrapper">';
$s .= '<label id="ijpost-bydefault-label" for="ijpost-bydefault">' . L10n::t('Post to InsaneJournal by default') . '</label>';
$s .= '<input id="ijpost-bydefault" type="checkbox" name="ij_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
$s .= '<div id="ijpost-bydefault-wrapper">';
$s .= '<label id="ijpost-bydefault-label" for="ijpost-bydefault">' . L10n::t('Post to InsaneJournal by default') . '</label>';
$s .= '<input id="ijpost-bydefault" type="checkbox" name="ij_bydefault" value="1" ' . $def_checked . '/>';
$s .= '</div><div class="clear"></div>';
/* provide a submit button */
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="ijpost-submit" name="ijpost-submit" class="settings-submit" value="' . L10n::t('Save Settings') . '" /></div></div>';
}
function ijpost_settings_post(&$a,&$b) {
if(x($_POST,'ijpost-submit')) {
PConfig::set(local_user(),'ijpost','post',intval($_POST['ijpost']));
PConfig::set(local_user(),'ijpost','post_by_default',intval($_POST['ij_bydefault']));
PConfig::set(local_user(),'ijpost','ij_username',trim($_POST['ij_username']));
PConfig::set(local_user(),'ijpost','ij_password',trim($_POST['ij_password']));
function ijpost_settings_post(&$a, &$b)
{
if (!empty($_POST['ijpost-submit'])) {
PConfig::set(local_user(), 'ijpost', 'post', intval($_POST['ijpost']));
PConfig::set(local_user(), 'ijpost', 'post_by_default', intval($_POST['ij_bydefault']));
PConfig::set(local_user(), 'ijpost', 'ij_username', trim($_POST['ij_username']));
PConfig::set(local_user(), 'ijpost', 'ij_password', trim($_POST['ij_password']));
}
}
function ijpost_post_local(&$a,&$b) {
function ijpost_post_local(&$a, &$b)
{
// This can probably be changed to allow editing by pointing to a different API endpoint
if($b['edit'])
if ($b['edit']) {
return;
}
if((! local_user()) || (local_user() != $b['uid']))
if (!local_user() || (local_user() != $b['uid'])) {
return;
}
if($b['private'] || $b['parent'])
if ($b['private'] || $b['parent']) {
return;
}
$ij_post = intval(PConfig::get(local_user(),'ijpost','post'));
$ij_post = intval(PConfig::get(local_user(), 'ijpost', 'post'));
$ij_enable = (($ij_post && x($_REQUEST,'ijpost_enable')) ? intval($_REQUEST['ijpost_enable']) : 0);
$ij_enable = (($ij_post && !empty($_REQUEST['ijpost_enable'])) ? intval($_REQUEST['ijpost_enable']) : 0);
if($_REQUEST['api_source'] && intval(PConfig::get(local_user(),'ijpost','post_by_default')))
if ($b['api_source'] && intval(PConfig::get(local_user(), 'ijpost', 'post_by_default'))) {
$ij_enable = 1;
}
if(! $ij_enable)
return;
if (!$ij_enable) {
return;
}
if(strlen($b['postopts']))
$b['postopts'] .= ',';
$b['postopts'] .= 'ijpost';
if (strlen($b['postopts'])) {
$b['postopts'] .= ',';
}
$b['postopts'] .= 'ijpost';
}
function ijpost_send(&$a, &$b)
{
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
}
if (!strstr($b['postopts'], 'ijpost')) {
return;
}
function ijpost_send(&$a,&$b) {
if($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited']))
return;
if(! strstr($b['postopts'],'ijpost'))
return;
if($b['parent'] != $b['id'])
return;
if ($b['parent'] != $b['id']) {
return;
}
// insanejournal post in the LJ user's timezone.
// Hopefully the person's Friendica account
@ -170,17 +174,19 @@ function ijpost_send(&$a,&$b) {
$x = q("select timezone from user where uid = %d limit 1",
intval($b['uid'])
);
if($x && strlen($x[0]['timezone']))
$tz = $x[0]['timezone'];
$ij_username = PConfig::get($b['uid'],'ijpost','ij_username');
$ij_password = PConfig::get($b['uid'],'ijpost','ij_password');
if ($x && strlen($x[0]['timezone'])) {
$tz = $x[0]['timezone'];
}
$ij_username = PConfig::get($b['uid'], 'ijpost', 'ij_username');
$ij_password = PConfig::get($b['uid'], 'ijpost', 'ij_password');
$ij_blog = 'http://www.insanejournal.com/interface/xmlrpc';
if($ij_username && $ij_password && $ij_blog) {
if ($ij_username && $ij_password && $ij_blog) {
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$tags = ijpost_get_tags($b['tag']);
$date = DateTimeFormat::convert($b['created'], $tz);
@ -217,19 +223,18 @@ function ijpost_send(&$a,&$b) {
EOT;
logger('ijpost: data: ' . $xml, LOGGER_DATA);
Logger::log('ijpost: data: ' . $xml, Logger::DATA);
if($ij_blog !== 'test') {
$x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"]);
if ($ij_blog !== 'test') {
$x = Network::post($ij_blog, $xml, ["Content-Type: text/xml"])->getBody();
}
logger('posted to insanejournal: ' . ($x) ? $x : '', LOGGER_DEBUG);
Logger::log('posted to insanejournal: ' . $x ? $x : '', Logger::DEBUG);
}
}
function ijpost_get_tags($post)
{
preg_match_all("/\]([^\[#]+)\[/",$post,$matches);
$tags = implode(', ',$matches[1]);
preg_match_all("/\]([^\[#]+)\[/", $post, $matches);
$tags = implode(', ', $matches[1]);
return $tags;
}

View file

@ -4,44 +4,45 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:40+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-12 09:49+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: ijpost.php:39
msgid "Post to Insanejournal"
msgstr "Odeslat na Insanejournal"
msgstr "Posílat na InsaneJournal"
#: ijpost.php:70
msgid "InsaneJournal Post Settings"
msgstr "Nastavení příspěvků pro InsaneJournal"
msgstr "Nastavení InsaneJournal Post"
#: ijpost.php:72
msgid "Enable InsaneJournal Post Addon"
msgstr "Povolit Insanejournal addon"
msgstr "Povolit doplněk InsaneJournal Post"
#: ijpost.php:77
msgid "InsaneJournal username"
msgstr "Insanejournal uživatelské jméno"
msgstr "Uživatelské jméno InsaneJournal"
#: ijpost.php:82
msgid "InsaneJournal password"
msgstr "Insanejournal heslo"
msgstr "Heslo InsaneJournal"
#: ijpost.php:87
msgid "Post to InsaneJournal by default"
msgstr "Defaultně zasílat příspěvky na InsaneJournal"
msgstr "Ve výchozím stavu posílat příspěvky na InsaneJournal"
#: ijpost.php:93
msgid "Submit"

View file

@ -2,13 +2,14 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Post to Insanejournal"] = "Odeslat na Insanejournal";
$a->strings["InsaneJournal Post Settings"] = "Nastavení příspěvků pro InsaneJournal";
$a->strings["Enable InsaneJournal Post Addon"] = "Povolit Insanejournal addon";
$a->strings["InsaneJournal username"] = "Insanejournal uživatelské jméno";
$a->strings["InsaneJournal password"] = "Insanejournal heslo";
$a->strings["Post to InsaneJournal by default"] = "Defaultně zasílat příspěvky na InsaneJournal";
$a->strings["Post to Insanejournal"] = "Posílat na InsaneJournal";
$a->strings["InsaneJournal Post Settings"] = "Nastavení InsaneJournal Post";
$a->strings["Enable InsaneJournal Post Addon"] = "Povolit doplněk InsaneJournal Post";
$a->strings["InsaneJournal username"] = "Uživatelské jméno InsaneJournal";
$a->strings["InsaneJournal password"] = "Heslo InsaneJournal";
$a->strings["Post to InsaneJournal by default"] = "Ve výchozím stavu posílat příspěvky na InsaneJournal";
$a->strings["Submit"] = "Odeslat";

View file

@ -16,13 +16,14 @@ Simply fill in the fields in the impressium settings page in the addons area of
Manual Configuration
--------------------
If you for any reason you prefer to use a configuration file instead, you can set the following variables in the config/addon.ini.php file
If you for any reason you prefer to use a configuration file instead, you can set the following variables in the `config/addon.config.php` file
[impressum]
owner = this is the Name of the Operator
ownerprofile = this is an optional Friendica account where the above owner name will link to
email = a contact email address (optional)
will be displayed slightly obfuscated as name(at)example(dot)com
postal = should contain a postal address where you can be reached at (optional)
notes = additional informations that should be displayed in the Impressum block
footer_text = Text that will be displayed at the bottom of the pages.
'impressum' => [
'owner' => '', This is the Name of the Operator
'ownerprofile' => '', This is an optional Friendica account where the above owner name will link to
'email' => '', A contact email address (optional)
Will be displayed slightly obfuscated as name(at)example(dot)com
'postal' => '', Should contain a postal address where you can be reached at (optional)
'notes' => '', Additional informations that should be displayed in the Impressum block
'footer_text' => '', Text that will be displayed at the bottom of the pages.
],

View file

@ -0,0 +1,33 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'impressum' => [
// owner (String)
// This is the Name of the Operator
'owner' => '',
// ownerprofile (String)
// This is an optional Friendica account where the above owner name will link to
'ownerprofile' => '',
// email (String)
// A contact email address (optional)
// Will be displayed slightly obfuscated as name(at)example(dot)com
'email' => '',
// postal (String)
// Should contain a postal address where you can be reached at (optional)
'postal' => '',
// notes (String)
// Additional informations that should be displayed in the Impressum block
'notes' => '',
// footer_text (String)
// Text that will be displayed at the bottom of the pages.
'footer_text' => '',
],
];

View file

@ -1,33 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[impressum]
; owner (String)
; This is the Name of the Operator
owner =
; ownerprofile (String)
; This is an optional Friendica account where the above owner name will link to
ownerprofile =
; email (String)
; A contact email address (optional)
; Will be displayed slightly obfuscated as name(at)example(dot)com
email =
; postal (String)
; Should contain a postal address where you can be reached at (optional)
postal =
; notes (String)
; Additional informations that should be displayed in the Impressum block
notes =
; footer_text (String)
; Text that will be displayed at the bottom of the pages.
footer_text =
INI;
//Keep this line

View file

@ -11,27 +11,30 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
function impressum_install() {
Addon::registerHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::registerHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::registerHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("installed impressum Addon");
Logger::log("installed impressum Addon");
}
function impressum_uninstall() {
Addon::unregisterHook('load_config', 'addon/impressum/impressum.php', 'impressum_load_config');
Addon::unregisterHook('about_hook', 'addon/impressum/impressum.php', 'impressum_show');
Addon::unregisterHook('page_end', 'addon/impressum/impressum.php', 'impressum_footer');
logger("uninstalled impressum Addon");
Logger::log("uninstalled impressum Addon");
}
function impressum_module() {
}
function impressum_content() {
$a = get_app();
goaway('friendica/');
$a->internalRedirect('friendica/');
}
function obfuscate_email ($s) {
@ -43,7 +46,7 @@ function impressum_footer($a, &$b) {
$text = ProxyUtils::proxifyHtml(BBCode::convert(Config::get('impressum','footer_text')));
if (! $text == '') {
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/impressum/impressum.css" media="all" />';
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->getBaseURL().'/addon/impressum/impressum.css" media="all" />';
$b .= '<div class="clear"></div>';
$b .= '<div id="impressum_footer">'.$text.'</div>';
}
@ -51,7 +54,7 @@ function impressum_footer($a, &$b) {
function impressum_load_config(\Friendica\App $a)
{
$a->loadConfigFile(__DIR__. '/config/impressum.ini.php');
$a->loadConfigFile(__DIR__ . '/config/impressum.config.php');
}
function impressum_show($a,&$b) {
@ -84,12 +87,12 @@ function impressum_show($a,&$b) {
}
function impressum_addon_admin_post (&$a) {
$owner = ((x($_POST, 'owner')) ? notags(trim($_POST['owner'])) : '');
$ownerprofile = ((x($_POST, 'ownerprofile')) ? notags(trim($_POST['ownerprofile'])) : '');
$postal = ((x($_POST, 'postal')) ? (trim($_POST['postal'])) : '');
$notes = ((x($_POST, 'notes')) ? (trim($_POST['notes'])) : '');
$email = ((x($_POST, 'email')) ? notags(trim($_POST['email'])) : '');
$footer_text = ((x($_POST, 'footer_text')) ? (trim($_POST['footer_text'])) : '');
$owner = (!empty($_POST['owner']) ? Strings::escapeTags(trim($_POST['owner'])) : '');
$ownerprofile = (!empty($_POST['ownerprofile']) ? Strings::escapeTags(trim($_POST['ownerprofile'])) : '');
$postal = (!empty($_POST['postal']) ? (trim($_POST['postal'])) : '');
$notes = (!empty($_POST['notes']) ? (trim($_POST['notes'])) : '');
$email = (!empty($_POST['email']) ? Strings::escapeTags(trim($_POST['email'])) : '');
$footer_text = (!empty($_POST['footer_text']) ? (trim($_POST['footer_text'])) : '');
Config::set('impressum','owner',strip_tags($owner));
Config::set('impressum','ownerprofile',strip_tags($ownerprofile));
Config::set('impressum','postal',strip_tags($postal));
@ -99,8 +102,8 @@ function impressum_addon_admin_post (&$a) {
info(L10n::t('Settings updated.'). EOL );
}
function impressum_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/impressum/" );
$o = replace_macros($t, [
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/impressum/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$owner' => ['owner', L10n::t('Site Owner'), Config::get('impressum','owner'), L10n::t('The page operators name.')],
'$ownerprofile' => ['ownerprofile', L10n::t('Site Owners Profile'), Config::get('impressum','ownerprofile'), L10n::t('Profile address of the operator.')],

View file

@ -4,20 +4,21 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:41+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-12 09:51+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: impressum.php:37
msgid "Impressum"
@ -25,7 +26,7 @@ msgstr "Impressum"
#: impressum.php:50 impressum.php:52 impressum.php:84
msgid "Site Owner"
msgstr "Vlastník webu"
msgstr "Majitel webu"
#: impressum.php:50 impressum.php:88
msgid "Email Address"
@ -40,11 +41,11 @@ msgid ""
"The impressum addon needs to be configured!<br />Please add at least the "
"<tt>owner</tt> variable to your config file. For other variables please "
"refer to the README file of the addon."
msgstr "Doplněk Impressum musí být nakonfigurován!<br/>Prosím, přidejte alespoň proměnnou <tt>owner</tt> do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku."
msgstr "Doplněk Impressum musí být nakonfigurován!<br />Prosím, přidejte alespoň proměnnou <tt>owner</tt> do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku."
#: impressum.php:78
msgid "Settings updated."
msgstr "Nastavení aktualizováno."
msgstr "Nastavení aktualizována."
#: impressum.php:83
msgid "Submit"
@ -60,7 +61,7 @@ msgstr "Profil majitele webu"
#: impressum.php:85
msgid "Profile address of the operator."
msgstr "Profilová addresa operátora."
msgstr "Profilová adresa operátora."
#: impressum.php:86
msgid "How to contact the operator via snail mail. You can use BBCode here."
@ -78,7 +79,7 @@ msgstr "Další poznámky, které jsou zobrazeny pod kontaktními informacemi. Z
#: impressum.php:88
msgid "How to contact the operator via email. (will be displayed obfuscated)"
msgstr "Jak konktaktovat operátora přes mail. (bude zobrazen \"zmateně\")"
msgstr "Jak konktaktovat operátora přes mail. (bude zobrazeno \"obfuskovaně\")"
#: impressum.php:89
msgid "Footer note"

View file

@ -2,22 +2,23 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Impressum"] = "Impressum";
$a->strings["Site Owner"] = "Vlastník webu";
$a->strings["Site Owner"] = "Majitel webu";
$a->strings["Email Address"] = "E-mailová adresa";
$a->strings["Postal Address"] = "Poštovní adresa";
$a->strings["The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon."] = "Doplněk Impressum musí být nakonfigurován!<br/>Prosím, přidejte alespoň proměnnou <tt>owner</tt> do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku.";
$a->strings["Settings updated."] = "Nastavení aktualizováno.";
$a->strings["The impressum addon needs to be configured!<br />Please add at least the <tt>owner</tt> variable to your config file. For other variables please refer to the README file of the addon."] = "Doplněk Impressum musí být nakonfigurován!<br />Prosím, přidejte alespoň proměnnou <tt>owner</tt> do konfiguračního souboru. Pro nastavení ostatních proměnných se seznamte s nápovědou v souboru README tohoto doplňku.";
$a->strings["Settings updated."] = "Nastavení aktualizována.";
$a->strings["Submit"] = "Odeslat";
$a->strings["The page operators name."] = "Jméno operátora stránky.";
$a->strings["Site Owners Profile"] = "Profil majitele webu";
$a->strings["Profile address of the operator."] = "Profilová addresa operátora.";
$a->strings["Profile address of the operator."] = "Profilová adresa operátora.";
$a->strings["How to contact the operator via snail mail. You can use BBCode here."] = "Jak kontaktovat operátora prostřednictvím klasické pošty. Zde můžete použít BBCode.";
$a->strings["Notes"] = "Poznámky";
$a->strings["Additional notes that are displayed beneath the contact information. You can use BBCode here."] = "Další poznámky, které jsou zobrazeny pod kontaktními informacemi. Zde můžete použít BBCode.";
$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Jak konktaktovat operátora přes mail. (bude zobrazen \"zmate\")";
$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Jak konktaktovat operátora přes mail. (bude zobrazeno \"obfuskova\")";
$a->strings["Footer note"] = "Poznámka v zápatí";
$a->strings["Text for the footer. You can use BBCode here."] = "Text pro zápatí. Zde můžete použít BBCode.";

View file

@ -32,13 +32,13 @@ function infiniteimprobabilitydrive_module()
function infiniteimprobabilitydrive_content(&$a)
{
$baseurl = $a->get_baseurl() . '/addon/infiniteimprobabilitydrive';
$baseurl = $a->getBaseURL() . '/addon/infiniteimprobabilitydrive';
$o = '';
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->get_baseurl().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.$a->getBaseURL().'/addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.css"/>';
$baseurl = $a->get_baseurl();
$baseurl = $a->getBaseURL();
$o .= <<< EOT

View file

@ -10,6 +10,7 @@ use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
function irc_install() {
Addon::registerHook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
@ -30,14 +31,14 @@ function irc_addon_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
// $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
// $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/irc/irc.css' . '" media="all" />' . "\r\n";
/* setting popular channels, auto connect channels */
$sitechats = PConfig::get( local_user(), 'irc','sitechats'); /* popular channels */
$autochans = PConfig::get( local_user(), 'irc','autochans'); /* auto connect chans */
$t = get_markup_template( "settings.tpl", "addon/irc/" );
$s .= replace_macros($t, [
$t = Renderer::getMarkupTemplate( "settings.tpl", "addon/irc/" );
$s .= Renderer::replaceMacros($t, [
'$header' => L10n::t('IRC Settings'),
'$info' => L10n::t('Here you can change the system wide settings for the channels to automatically join and access via the side bar. Note the changes you do here, only effect the channel selection if you are logged in.'),
'$submit' => L10n::t('Save Settings'),
@ -74,7 +75,7 @@ function irc_module() {
function irc_content(&$a) {
$baseurl = $a->get_baseurl() . '/addon/irc';
$baseurl = $a->getBaseURL() . '/addon/irc';
$o = '';
/* set the list of popular channels */
@ -93,7 +94,7 @@ function irc_content(&$a) {
$a->page['aside'] .= '<div class="widget"><h3>' . L10n::t('Popular Channels') . '</h3><ul>';
foreach($chats as $chat) {
$a->page['aside'] .= '<li><a href="' . $a->get_baseurl() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
$a->page['aside'] .= '<li><a href="' . $a->getBaseURL() . '/irc?channels=' . $chat . '" >' . '#' . $chat . '</a></li>';
}
$a->page['aside'] .= '</ul></div>';
@ -108,7 +109,7 @@ function irc_content(&$a) {
if($autochans)
$channels = $autochans;
else
$channels = ((x($_GET,'channels')) ? $_GET['channels'] : 'friendica');
$channels = defaults($_GET, 'channels', 'friendica');
/* add the chatroom frame and some html */
$o .= <<< EOT
@ -135,8 +136,8 @@ function irc_addon_admin_post (&$a) {
function irc_addon_admin (&$a, &$o) {
$sitechats = Config::get('irc','sitechats'); /* popular channels */
$autochans = Config::get('irc','autochans'); /* auto connect chans */
$t = get_markup_template( "admin.tpl", "addon/irc/" );
$o = replace_macros($t, [
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/irc/" );
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$autochans' => [ 'autochans', L10n::t('Channel(s) to auto connect (comma separated)'), $autochans, L10n::t('List of channels that shall automatically connected to when the app is launched.')],
'$sitechats' => [ 'sitechats', L10n::t('Popular Channels (comma separated)'), $sitechats, L10n::t('List of popular channels, will be displayed at the side and hotlinked for easy joining.') ]

View file

@ -66,6 +66,7 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
@ -323,10 +324,10 @@ function jappixmini_settings(App $a, &$s)
if (!$activate) {
// load scripts if not yet activated so that password can be saved
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
}
$s .= '<span id="settings_jappixmini_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_jappixmini_expanded\'); openClose(\'settings_jappixmini_inflated\');">';
@ -489,10 +490,10 @@ function jappixmini_script(App $a)
return;
}
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;g=mini.xml"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=presence.js~caps.js~name.js~roster.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
$username = PConfig::get(local_user(), 'jappixmini', 'username');
$username = str_replace("'", "\\'", $username);
@ -513,7 +514,7 @@ function jappixmini_script(App $a)
// set proxy if necessary
$use_proxy = Config::get('jappixmini', 'bosh_proxy');
if ($use_proxy) {
$proxy = $a->get_baseurl() . '/addon/jappixmini/proxy.php';
$proxy = $a->getBaseURL() . '/addon/jappixmini/proxy.php';
} else {
$proxy = "";
}
@ -568,10 +569,10 @@ function jappixmini_login(App $a, &$o)
{
// create client secret on login to be able to encrypt jabber passwords
// for setDB and str_sha1, needed by jappixmini_addon_set_client_secret
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=datastore.js~jsjac.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/jappix/php/get.php?t=js&amp;f=datastore.js~jsjac.js"></script>' . "\r\n";
// for jappixmini_addon_set_client_secret
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->get_baseurl() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
$a->page['htmlhead'] .= '<script type="text/javascript" src="' . $a->getBaseURL() . '/addon/jappixmini/lib.js"></script>' . "\r\n";
// save hash of password
$o = str_replace("<form ", "<form onsubmit=\"jappixmini_addon_set_client_secret(this.elements['id_password'].value);return true;\" ", $o);
@ -584,7 +585,7 @@ function jappixmini_cron(App $a, $d)
// go through list of users with jabber enabled
$users = q("SELECT `uid` FROM `pconfig` WHERE `cat`='jappixmini' AND (`k`='autosubscribe' OR `k`='autoapprove') AND `v`='1'");
logger("jappixmini: Update list of contacts' jabber accounts for " . count($users) . " users.");
Logger::log("jappixmini: Update list of contacts' jabber accounts for " . count($users) . " users.");
if (!count($users)) {
return;
@ -699,6 +700,6 @@ function jappixmini_download_source(App $a, &$b)
{
// Jappix Mini source download link on About page
$b .= '<h1>Jappix Mini</h1>';
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="' . $a->get_baseurl() . '/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="' . $a->get_baseurl() . '/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
$b .= '<p>You can download the <a href="' . $a->get_baseurl() . '/addon/jappixmini.tgz">source code of the addon</a>. The rest of Friendica is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/friendica">https://github.com/friendica/friendica</a> and <a href="https://github.com/friendica/friendica-addons">https://github.com/friendica/friendica-addons</a></p>';
$b .= '<p>This site uses the jappixmini addon, which includes Jappix Mini by the <a href="' . $a->getBaseURL() . '/addon/jappixmini/jappix/AUTHORS">Jappix authors</a> and is distributed under the terms of the <a href="' . $a->getBaseURL() . '/addon/jappixmini/jappix/COPYING">GNU Affero General Public License</a>.</p>';
$b .= '<p>You can download the <a href="' . $a->getBaseURL() . '/addon/jappixmini.tgz">source code of the addon</a>. The rest of Friendica is distributed under compatible licenses and can be retrieved from <a href="https://github.com/friendica/friendica">https://github.com/friendica/friendica</a> and <a href="https://github.com/friendica/friendica-addons">https://github.com/friendica/friendica-addons</a></p>';
}

View file

@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2018-08-16 10:11+0000\n"
"PO-Revision-Date: 2018-09-12 12:50+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
@ -36,7 +36,7 @@ msgstr "<em>Nevkládejte</em> Jappixmini Chat-Widget do webového rozhraní"
#: jappixmini.php:274
msgid "Jabber username"
msgstr "Jabber uživatelské jméno"
msgstr "Uživatelské jméno Jabber"
#: jappixmini.php:277
msgid "Jabber server"
@ -48,11 +48,11 @@ msgstr "Jabber BOSH host"
#: jappixmini.php:285
msgid "Jabber password"
msgstr "Jabber heslo"
msgstr "Heslo Jabber"
#: jappixmini.php:290
msgid "Encrypt Jabber password with Friendica password (recommended)"
msgstr "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)"
msgstr "Zašifrovat heslo Jabber heslem Friendica (doporučeno)"
#: jappixmini.php:293
msgid "Friendica password"
@ -60,11 +60,11 @@ msgstr "Heslo Friendica"
#: jappixmini.php:296
msgid "Approve subscription requests from Friendica contacts automatically"
msgstr "Automaticky schválit požadavek na členství od kontaktů Friendica."
msgstr "Automaticky schválit požadavek o odběr od kontaktů Friendica."
#: jappixmini.php:299
msgid "Subscribe to Friendica contacts automatically"
msgstr "Automaticky zaslat požadavek na členství kontaktům Friendica."
msgstr "Automaticky odebírat od kontaktů Friendica."
#: jappixmini.php:302
msgid "Purge internal list of jabber addresses of contacts"

View file

@ -9,14 +9,14 @@ function string_plural_select_cs($n){
$a->strings["Jappix Mini addon settings"] = "Nastavení rozšíření Jappix Mini";
$a->strings["Activate addon"] = "Aktivovat doplněk";
$a->strings["Do <em>not</em> insert the Jappixmini Chat-Widget into the webinterface"] = "<em>Nevkládejte</em> Jappixmini Chat-Widget do webového rozhraní";
$a->strings["Jabber username"] = "Jabber uživatelské jméno";
$a->strings["Jabber username"] = "Uživatelské jméno Jabber";
$a->strings["Jabber server"] = "Jabber server";
$a->strings["Jabber BOSH host"] = "Jabber BOSH host";
$a->strings["Jabber password"] = "Jabber heslo";
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat Jabber heslo s heslem Friendica (doporučeno)";
$a->strings["Jabber password"] = "Heslo Jabber";
$a->strings["Encrypt Jabber password with Friendica password (recommended)"] = "Zašifrovat heslo Jabber heslem Friendica (doporučeno)";
$a->strings["Friendica password"] = "Heslo Friendica";
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek na členství od kontaktů Friendica.";
$a->strings["Subscribe to Friendica contacts automatically"] = "Automaticky zaslat požadavek na členství kontaktům Friendica.";
$a->strings["Approve subscription requests from Friendica contacts automatically"] = "Automaticky schválit požadavek o odběr od kontaktů Friendica.";
$a->strings["Subscribe to Friendica contacts automatically"] = "Automaticky odebírat od kontaktů Friendica.";
$a->strings["Purge internal list of jabber addresses of contacts"] = "Očistit interní seznam jabber adres kontaktů";
$a->strings["Submit"] = "Odeslat";
$a->strings["Add contact"] = "Přidat kontakt";

View file

@ -17,6 +17,7 @@
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
function js_upload_install() {
Addon::registerHook('photo_upload_form', 'addon/js_upload/js_upload.php', 'js_upload_form');
@ -38,8 +39,8 @@ function js_upload_form(&$a,&$b) {
$b['default_upload'] = false;
$b['addon_text'] .= '<link href="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
$b['addon_text'] .= '<script src="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
$b['addon_text'] .= '<link href="' . $a->getBaseURL() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">';
$b['addon_text'] .= '<script src="' . $a->getBaseURL() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>';
$upload_msg = L10n::t('Select files for upload');
$drop_msg = L10n::t('Drop files here to upload');
@ -159,7 +160,7 @@ function js_upload_post_init(&$a,&$b) {
$a->data['upload_jsonresponse'] = htmlspecialchars(json_encode($result), ENT_NOQUOTES);
if(isset($result['error'])) {
logger('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , 'LOGGER_DEBUG');
Logger::log('mod/photos.php: photos_post(): error uploading photo: ' . $result['error'] , Logger::DEBUG);
echo json_encode($result);
killme();
}
@ -181,8 +182,8 @@ function js_upload_post_file(&$a,&$b) {
function js_upload_post_end(&$a,&$b) {
logger('upload_post_end');
if(x($a->data,'upload_jsonresponse')) {
Logger::log('upload_post_end');
if(!empty($a->data['upload_jsonresponse'])) {
echo $a->data['upload_jsonresponse'];
killme();
}

View file

@ -11,6 +11,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function krynn_install() {
@ -35,7 +36,7 @@ function krynn_install() {
Addon::registerHook('addon_settings', 'addon/krynn/krynn.php', 'krynn_settings');
Addon::registerHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
logger("installed krynn");
Logger::log("installed krynn");
}
@ -54,7 +55,7 @@ function krynn_uninstall() {
Addon::unregisterHook('addon_settings_post', 'addon/krynn/krynn.php', 'krynn_settings_post');
logger("removed krynn");
Logger::log("removed krynn");
}
@ -70,7 +71,7 @@ function krynn_post_hook($a, &$item) {
*
*/
logger('krynn invoked');
Logger::log('krynn invoked');
if(! local_user()) /* non-zero if this is a logged in user of this system */
return;
@ -141,7 +142,7 @@ function krynn_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/krynn/krynn.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/krynn/krynn.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View file

@ -12,6 +12,7 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
/* Define the hooks we want to use
* that is, we have settings, we need to save the settings and we want
@ -50,8 +51,8 @@ function langfilter_addon_settings(App $a, &$s)
$minconfidence = PConfig::get(local_user(), 'langfilter', 'minconfidence') * 100;
$minlength = PConfig::get(local_user(), 'langfilter', 'minlength');
$t = get_markup_template("settings.tpl", "addon/langfilter/");
$s .= replace_macros($t, [
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/langfilter/");
$s .= Renderer::replaceMacros($t, [
'$title' => L10n::t("Language Filter"),
'$intro' => L10n::t('This addon tries to identify the language posts are writen in. If it does not match any language specifed below, posts will be hidden by collapsing them.'),
'$enabled' => ['langfilter_enable', L10n::t('Use the language filter'), $enable_checked, ''],
@ -78,7 +79,7 @@ function langfilter_addon_settings_post(App $a, &$b)
if (!empty($_POST['langfilter-settings-submit'])) {
PConfig::set(local_user(), 'langfilter', 'languages', trim($_POST['langfilter_languages']));
$enable = (x($_POST, 'langfilter_enable') ? intval($_POST['langfilter_enable']) : 0);
$enable = (!empty($_POST['langfilter_enable']) ? intval($_POST['langfilter_enable']) : 0);
$disable = 1 - $enable;
PConfig::set(local_user(), 'langfilter', 'disable', $disable);
$minconfidence = 0 + $_POST['langfilter_minconfidence'];
@ -121,7 +122,7 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
// Never filter own messages
// TODO: find a better way to extract this
$logged_user_profile = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
$logged_user_profile = $a->getBaseURL() . '/profile/' . $a->user['nickname'];
if ($logged_user_profile == $hook_data['item']['author-link']) {
return;
}
@ -163,6 +164,10 @@ function langfilter_prepare_body_content_filter(App $a, &$hook_data)
break;
}
if (empty($iso2)) {
return;
}
$lang = Text_LanguageDetect_ISO639::code2ToName($iso2);
} else {
$opts = $hook_data['item']['postopts'];

View file

@ -1,38 +0,0 @@
Authenticate a user against an LDAP directory
Useful for Windows Active Directory and other LDAP-based organisations
to maintain a single password across the organisation.
Optionally authenticates only if a member of a given group in the directory.
By default, the person must have registered with Friendica using the normal registration
procedures in order to have a Friendica user record, contact, and profile.
However, it's possible with an option to automate the creation of a Friendica basic account.
Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
ldap.conf file to the signing cert for your LDAP server.
The configuration options for this module may be set in the config/addon.ini.php file
e.g.:
[ldapauth]
// ldap hostname server - required
ldap_server = host.example.com
// dn to search users - required
ldap_searchdn = ou=users,dc=example,dc=com
// attribute to find username - required
ldap_userattr = uid
// admin dn - optional - only if ldap server dont have anonymous access
ldap_binddn = cn=admin,dc=example,dc=com
// admin password - optional - only if ldap server dont have anonymous access
ldap_bindpw = password
// for create Friendica account if user exist in ldap
// required an email and a simple (beautiful) nickname on user ldap object
// active account creation - optional - default none
ldap_autocreateaccount = true
// attribute to get email - optional - default : 'mail'
ldap_autocreateaccount_emailattribute = mail
// attribute to get nickname - optional - default : 'givenName'
ldap_autocreateaccount_nameattribute = givenName
...etc.

49
ldapauth/README.md Normal file
View file

@ -0,0 +1,49 @@
Authenticate a user against an LDAP directory
===
Useful for Windows Active Directory and other LDAP-based organisations
to maintain a single password across the organisation.
Optionally authenticates only if a member of a given group in the directory.
By default, the person must have registered with Friendica using the normal registration
procedures in order to have a Friendica user record, contact, and profile.
However, it's possible with an option to automate the creation of a Friendica basic account.
Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
ldap.conf file to the signing cert for your LDAP server.
The configuration options for this module may be set in the `config/addon.config.php` file
e.g.:
'ldapauth' => [
// ldap hostname server - required
'ldap_server' => '',
// admin dn - optional - only if ldap server dont have anonymous access
'ldap_binddn' => '',
// admin password - optional - only if ldap server dont have anonymous access
'ldap_bindpw' => '',
// dn to search users - required
'ldap_searchdn' => '',
// attribute to find username - required
'ldap_userattr' => '',
// DN of the group whose member can auth on Friendica - optional
'ldap_group' => '',
// To create Friendica account if user exists in ldap
// Requires an email and a simple (beautiful) nickname on user ldap object
// active account creation - optional - default true
'ldap_autocreateaccount' => true,
// attribute to get email - optional - default : 'mail'
'ldap_autocreateaccount_emailattribute' => 'mail',
// attribute to get nickname - optional - default : 'givenName'
'ldap_autocreateaccount_nameattribute' => 'givenName',
],
...etc.

View file

@ -0,0 +1,50 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'ldapauth' => [
// ldap_server (String)
// ldap hostname server - required
// Example: ldap_server = host.example.com
'ldap_server' => '',
// ldap_binddn (String)
// admin dn - optional - only if ldap server dont have anonymous access
// Example: ldap_binddn = cn=admin,dc=example,dc=com
'ldap_binddn' => '',
// ldap_bindpw (String)
// admin password - optional - only if ldap server dont have anonymous access
'ldap_bindpw' => '',
// ldap_searchdn (String)
// dn to search users - required
// Example: ldap_searchdn = ou=users,dc=example,dc=com
'ldap_searchdn' => '',
// ldap_userattr (String)
// attribute to find username - required
// Example: ldap_userattr = uid
'ldap_userattr' => '',
// ldap_group (String)
// DN of the group whose member can auth on Friendica - optional
'ldap_group' => '',
// ldap_autocreateaccount (Boolean)
// To create Friendica account if user exists in ldap
// Requires an email and a simple (beautiful) nickname on user ldap object
// active account creation - optional - default true
'ldap_autocreateaccount' => true,
// ldap_autocreateaccount_emailattribute (String)
// attribute to get email - optional - default : 'mail'
'ldap_autocreateaccount_emailattribute' => 'mail',
// ldap_autocreateaccount_nameattribute (String)
// attribute to get nickname - optional - default : 'givenName'
'ldap_autocreateaccount_nameattribute' => 'givenName',
],
];

View file

@ -1,50 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[ldapauth]
; ldap_server (String)
; ldap hostname server - required
; Example: ldap_server = host.example.com
ldap_server =
; ldap_binddn (String)
; admin dn - optional - only if ldap server dont have anonymous access
; Example: ldap_binddn = cn=admin,dc=example,dc=com
ldap_binddn =
; ldap_bindpw (String)
; admin password - optional - only if ldap server dont have anonymous access
ldap_bindpw =
; ldap_searchdn (String)
; dn to search users - required
; Example: ldap_searchdn = ou=users,dc=example,dc=com
ldap_searchdn =
; ldap_userattr (String)
; attribute to find username - required
; Example: ldap_userattr = uid
ldap_userattr =
; ldap_group (String)
; DN of the group whose member can auth on Friendica - optional
ldap_group =
; ldap_autocreateaccount (Boolean)
; for create Friendica account if user exist in ldap
; required an email and a simple (beautiful) nickname on user ldap object
; active account creation - optional - default none
ldap_autocreateaccount = true
; ldap_autocreateaccount_emailattribute (String)
; attribute to get email - optional - default : 'mail'
ldap_autocreateaccount_emailattribute = mail
; ldap_autocreateaccount_nameattribute (String)
; attribute to get nickname - optional - default : 'givenName'
ldap_autocreateaccount_nameattribute = givenName
INI;
//Keep this line

View file

@ -26,7 +26,7 @@
* Note when using with Windows Active Directory: you may need to set TLS_CACERT in your site
* ldap.conf file to the signing cert for your LDAP server.
*
* The configuration options for this module may be set in the config/addon.ini.php file
* The configuration options for this module may be set in the config/addon.config.php file
* e.g.:
*
* [ldapauth]
@ -55,6 +55,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Logger;
use Friendica\Model\User;
function ldapauth_install()
@ -71,7 +72,7 @@ function ldapauth_uninstall()
function ldapauth_load_config(\Friendica\App $a)
{
$a->loadConfigFile(__DIR__. '/config/ldapauth.ini.php');
$a->loadConfigFile(__DIR__ . '/config/ldapauth.config.php');
}
function ldapauth_hook_authenticate($a, &$b)
@ -99,28 +100,28 @@ function ldapauth_authenticate($username, $password)
$ldap_autocreateaccount_nameattribute = Config::get('ldapauth', 'ldap_autocreateaccount_nameattribute');
if (!(strlen($password) && function_exists('ldap_connect') && strlen($ldap_server))) {
logger("ldapauth: not configured or missing php-ldap module");
Logger::log("ldapauth: not configured or missing php-ldap module");
return false;
}
$connect = @ldap_connect($ldap_server);
if ($connect === false) {
logger("ldapauth: could not connect to $ldap_server");
Logger::log("ldapauth: could not connect to $ldap_server");
return false;
}
@ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);
@ldap_set_option($connect, LDAP_OPT_REFERRALS, 0);
if ((@ldap_bind($connect, $ldap_binddn, $ldap_bindpw)) === false) {
logger("ldapauth: could not bind $ldap_server as $ldap_binddn");
Logger::log("ldapauth: could not bind $ldap_server as $ldap_binddn");
return false;
}
$res = @ldap_search($connect, $ldap_searchdn, $ldap_userattr . '=' . $username);
if (!$res) {
logger("ldapauth: $ldap_userattr=$username,$ldap_searchdn not found");
Logger::log("ldapauth: $ldap_userattr=$username,$ldap_searchdn not found");
return false;
}
@ -161,13 +162,13 @@ function ldapauth_authenticate($username, $password)
@ldap_close($connect);
if ($eno === 32) {
logger("ldapauth: access control group Does Not Exist");
Logger::log("ldapauth: access control group Does Not Exist");
return false;
} elseif ($eno === 16) {
logger('ldapauth: membership attribute does not exist in access control group');
Logger::log('ldapauth: membership attribute does not exist in access control group');
return false;
} else {
logger('ldapauth: error: ' . $err);
Logger::log('ldapauth: error: ' . $err);
return false;
}
} elseif ($r === false) {
@ -189,12 +190,12 @@ function ldap_autocreateaccount($ldap_autocreateaccount, $username, $password, $
try {
User::create($arr);
logger("ldapauth: account " . $username . " created");
Logger::log("ldapauth: account " . $username . " created");
} catch (Exception $ex) {
logger("ldapauth: account " . $username . " was not created ! : " . $ex->getMessage());
Logger::log("ldapauth: account " . $username . " was not created ! : " . $ex->getMessage());
}
} else {
logger("ldapauth: unable to create account, no email or nickname found");
Logger::log("ldapauth: unable to create account, no email or nickname found");
}
}
}

View file

@ -7,6 +7,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\Logger;
use Friendica\Util\Network;
function leistungsschutzrecht_install() {
@ -163,7 +164,7 @@ function leistungsschutzrecht_cron($a,$b) {
if($last) {
$next = $last + 86400;
if($next > time()) {
logger('poll intervall not reached');
Logger::log('poll intervall not reached');
return;
}
}

View file

@ -6,29 +6,34 @@
* Author: Tony Baldwin <https://free-haven.org/u/tony>
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Database\DBA;
use Friendica\Util\Network;
function libertree_install() {
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall() {
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
function libertree_install()
{
Addon::registerHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::registerHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::registerHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::registerHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::registerHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::registerHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/libertree/libertree.php', 'libertree_hook_fork');
Addon::unregisterHook('post_local', 'addon/libertree/libertree.php', 'libertree_post_local');
Addon::unregisterHook('notifier_normal', 'addon/libertree/libertree.php', 'libertree_send');
Addon::unregisterHook('jot_networks', 'addon/libertree/libertree.php', 'libertree_jot_nets');
Addon::unregisterHook('connector_settings', 'addon/libertree/libertree.php', 'libertree_settings');
Addon::unregisterHook('connector_settings_post', 'addon/libertree/libertree.php', 'libertree_settings_post');
}
function libertree_jot_nets(&$a,&$b) {
if(! local_user())
@ -51,7 +56,7 @@ function libertree_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/libertree/libertree.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/libertree/libertree.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -106,7 +111,7 @@ function libertree_settings(&$a,&$s) {
function libertree_settings_post(&$a,&$b) {
if(x($_POST,'libertree-submit')) {
if(!empty($_POST['libertree-submit'])) {
PConfig::set(local_user(),'libertree','post',intval($_POST['libertree']));
PConfig::set(local_user(),'libertree','post_by_default',intval($_POST['libertree_bydefault']));
@ -117,6 +122,21 @@ function libertree_settings_post(&$a,&$b) {
}
function libertree_hook_fork(App &$a, array &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'libertree') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function libertree_post_local(&$a,&$b) {
// This can probably be changed to allow editing by pointing to a different API endpoint
@ -135,7 +155,7 @@ function libertree_post_local(&$a,&$b) {
$ltree_post = intval(PConfig::get(local_user(),'libertree','post'));
$ltree_enable = (($ltree_post && x($_REQUEST,'libertree_enable')) ? intval($_REQUEST['libertree_enable']) : 0);
$ltree_enable = (($ltree_post && !empty($_REQUEST['libertree_enable'])) ? intval($_REQUEST['libertree_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(),'libertree','post_by_default'))) {
$ltree_enable = 1;
@ -157,7 +177,7 @@ function libertree_post_local(&$a,&$b) {
function libertree_send(&$a,&$b) {
logger('libertree_send: invoked');
Logger::log('libertree_send: invoked');
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
@ -181,7 +201,7 @@ function libertree_send(&$a,&$b) {
$ltree_api_token = PConfig::get($b['uid'],'libertree','libertree_api_token');
$ltree_url = PConfig::get($b['uid'],'libertree','libertree_url');
$ltree_blog = "$ltree_url/api/v1/posts/create/?token=$ltree_api_token";
$ltree_source = $a->get_hostname();
$ltree_source = $a->getHostName();
if ($b['app'] != "")
$ltree_source .= " (".$b['app'].")";
@ -231,7 +251,7 @@ function libertree_send(&$a,&$b) {
// 'token' => $ltree_api_token
];
$result = Network::post($ltree_blog, $params);
logger('libertree: ' . $result);
$result = Network::post($ltree_blog, $params)->getBody();
Logger::log('libertree: ' . $result);
}
}

View file

@ -23,14 +23,18 @@ If no avatar was found for an email Libravatar can create some pseudo-random gen
See examples at [Libravatar][1].
## Alternative Configuration
Open the config/local.ini.php file and add "libravatar" to the list of activated addons:
Open the `config/local.config.php` file and add "libravatar" to the list of activated addons:
[system]
addon = ...,libravatar
'system' => [
...
'addon' => '...,libravatar'
...
]
You can add one configuration variables for the addon to the config/addon.ini.php file:
You can add one configuration variables for the addon to the `config/addon.config.php` file:
[libravatar]
default_avatar = identicon
'libravatar' => [
'default_avatar' => 'identicon',
],
[1]: http://wiki.libravatar.org/api/ "See API documentation at Libravatar for more information"

View file

@ -0,0 +1,18 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'libravatar' => [
// default_avatar (String)
// If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
// You can choose between these presets:
// - mm : (mystery-man) a static image
// - identicon: a generated geometric pattern based on email hash
// - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
// - wavatar : faces with different features and backgrounds based on email hash
// - retro : 8-bit arcade-styled pixelated faces based on email hash
'default_avatar' => 'identicon',
],
];

View file

@ -1,18 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[libravatar]
; default_avatar (String)
; If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
; You can choose between these presets:
; - mm : (mystery-man) a static image
; - identicon: a generated geometric pattern based on email hash
; - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
; - wavatar : faces with different features and backgrounds based on email hash
; - retro : 8-bit arcade-styled pixelated faces based on email hash
default_avatar = identicon
INI;
//Keep this line

View file

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:41+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-12 12:54+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: libravatar.php:14
msgid "Could NOT install Libravatar successfully.<br>It requires PHP >= 5.3"
msgstr "Libravatar není možné úspěšně nainstalovat .<br>Vyžaduje PHP >= 5.3"
msgstr "Libravatar NENÍ možné úspěšně nainstalovat.<br>Vyžaduje PHP >= 5.3"
#: libravatar.php:73
msgid "generic profile image"
@ -45,16 +46,16 @@ msgstr "tvář v retro arkádovém stylu"
#: libravatar.php:82
msgid "Warning"
msgstr "Omezení"
msgstr "Varování"
#: libravatar.php:83
#, php-format
msgid "Your PHP version %s is lower than the required PHP >= 5.3."
msgstr "Vaše PHP verze %s je nižší než požadovaná PHP >= 5.3."
msgstr "Vaše verze PHP %s je nižší než požadovaná: PHP >= 5.3."
#: libravatar.php:84
msgid "This addon is not functional on your server."
msgstr "Tento doplněk není funkční na Vašem serveru."
msgstr "Tento doplněk není na Vašem serveru funkční."
#: libravatar.php:93
msgid "Information"
@ -65,7 +66,7 @@ msgid ""
"Gravatar addon is installed. Please disable the Gravatar addon.<br>The "
"Libravatar addon will fall back to Gravatar if nothing was found at "
"Libravatar."
msgstr "Gravatar doplněk je nainstalován. Prosím zakažte doplněk Gravatar. <br>Libravatar doplněk se vrátí k doplňku Gravatar, pokud na Libravataru nebude nic nalezeno."
msgstr "Doplněk Gravatar je nainstalován. Prosím zakažte doplněk Gravatar.<br>Doplněk Libravatar se přepne na Gravatar, pokud na Libravataru nebude nic nalezeno."
#: libravatar.php:99
msgid "Submit"
@ -73,11 +74,11 @@ msgstr "Odeslat"
#: libravatar.php:100
msgid "Default avatar image"
msgstr "Defaultní obrázek avataru"
msgstr "Výchozí avatarový obrázek"
#: libravatar.php:100
msgid "Select default avatar image if none was found. See README"
msgstr "Vyberte defaultní avatar obrázek pokud nebyl žádný nalezen. Více viz. soubor README."
msgstr "Nastavte výchozí avatarový obrázek, pokud není žádný nalezen. Více viz. soubor README."
#: libravatar.php:112
msgid "Libravatar settings updated."

View file

@ -2,21 +2,22 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Could NOT install Libravatar successfully.<br>It requires PHP >= 5.3"] = "Libravatar není možné úspěšně nainstalovat .<br>Vyžaduje PHP >= 5.3";
$a->strings["Could NOT install Libravatar successfully.<br>It requires PHP >= 5.3"] = "Libravatar NENÍ možné úspěšně nainstalovat.<br>Vyžaduje PHP >= 5.3";
$a->strings["generic profile image"] = "generický profilový obrázek";
$a->strings["random geometric pattern"] = "náhodný geometrický vzor";
$a->strings["monster face"] = "tvář příšery";
$a->strings["computer generated face"] = "počítačově generovaná tvář";
$a->strings["retro arcade style face"] = "tvář v retro arkádovém stylu";
$a->strings["Warning"] = "Omeze";
$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "Vaše PHP verze %s je nižší než požadovaná PHP >= 5.3.";
$a->strings["This addon is not functional on your server."] = "Tento doplněk není funkční na Vašem serveru.";
$a->strings["Warning"] = "Varová";
$a->strings["Your PHP version %s is lower than the required PHP >= 5.3."] = "Vaše verze PHP %s je nižší než požadovaná: PHP >= 5.3.";
$a->strings["This addon is not functional on your server."] = "Tento doplněk není na Vašem serveru funkční.";
$a->strings["Information"] = "Informace";
$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "Gravatar doplněk je nainstalován. Prosím zakažte doplněk Gravatar. <br>Libravatar doplněk se vrátí k doplňku Gravatar, pokud na Libravataru nebude nic nalezeno.";
$a->strings["Gravatar addon is installed. Please disable the Gravatar addon.<br>The Libravatar addon will fall back to Gravatar if nothing was found at Libravatar."] = "Doplněk Gravatar je nainstalován. Prosím zakažte doplněk Gravatar.<br>Doplněk Libravatar se přepne na Gravatar, pokud na Libravataru nebude nic nalezeno.";
$a->strings["Submit"] = "Odeslat";
$a->strings["Default avatar image"] = "Defaultní obrázek avataru";
$a->strings["Select default avatar image if none was found. See README"] = "Vyberte defaultní avatar obrázek pokud nebyl žádný nalezen. Více viz. soubor README.";
$a->strings["Default avatar image"] = "Výchozí avatarový obrázek";
$a->strings["Select default avatar image if none was found. See README"] = "Nastavte výchozí avatarový obrázek, pokud není žádný nalezen. Více viz. soubor README.";
$a->strings["Libravatar settings updated."] = "Nastavení Libravatar aktualizováno.";

View file

@ -7,10 +7,15 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
* Installs the addon hook
@ -19,7 +24,7 @@ function libravatar_install()
{
Addon::registerHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("registered libravatar in avatar_lookup hook");
Logger::log("registered libravatar in avatar_lookup hook");
}
/**
@ -29,12 +34,12 @@ function libravatar_uninstall()
{
Addon::unregisterHook('load_config', 'addon/libravatar/libravatar.php', 'libravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/libravatar/libravatar.php', 'libravatar_lookup');
logger("unregistered libravatar in avatar_lookup hook");
Logger::log("unregistered libravatar in avatar_lookup hook");
}
function libravatar_load_config(App $a)
{
$a->loadConfigFile(__DIR__. '/config/libravatar.ini.php');
$a->loadConfigFile(__DIR__ . '/config/libravatar.config.php');
}
/**
@ -71,7 +76,7 @@ function libravatar_lookup($a, &$b)
*/
function libravatar_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/libravatar");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/libravatar");
$default_avatar = Config::get('libravatar', 'default_avatar');
@ -106,8 +111,8 @@ function libravatar_addon_admin(&$a, &$o)
}
// output Libravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("libravatarsave") .'">';
$o .= replace_macros( $t, [
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("libravatarsave") .'">';
$o .= Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found. See README'), $default_avatars],
]);
@ -118,9 +123,9 @@ function libravatar_addon_admin(&$a, &$o)
*/
function libravatar_addon_admin_post(&$a)
{
check_form_security_token('libravatarrsave');
BaseModule::checkFormSecurityToken('libravatarrsave');
$default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon');
$default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon');
Config::set('libravatar', 'default_avatar', $default_avatar);
info(L10n::t('Libravatar settings updated.') .EOL);
}

View file

@ -11,9 +11,11 @@
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
function ljpost_install() {
Addon::registerHook('post_local', 'addon/ljpost/ljpost.php', 'ljpost_post_local');
@ -54,7 +56,7 @@ function ljpost_settings(&$a,&$s) {
/* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/ljpost/ljpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -103,7 +105,7 @@ function ljpost_settings(&$a,&$s) {
function ljpost_settings_post(&$a,&$b) {
if(x($_POST,'ljpost-submit')) {
if(!empty($_POST['ljpost-submit'])) {
PConfig::set(local_user(),'ljpost','post',intval($_POST['ljpost']));
PConfig::set(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
@ -129,7 +131,7 @@ function ljpost_post_local(&$a,&$b) {
$lj_post = intval(PConfig::get(local_user(),'ljpost','post'));
$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0);
$lj_enable = (($lj_post && !empty($_REQUEST['ljpost_enable'])) ? intval($_REQUEST['ljpost_enable']) : 0);
if($b['api_source'] && intval(PConfig::get(local_user(),'ljpost','post_by_default')))
$lj_enable = 1;
@ -168,20 +170,20 @@ function ljpost_send(&$a,&$b) {
if($x && strlen($x[0]['timezone']))
$tz = $x[0]['timezone'];
$lj_username = xmlify(PConfig::get($b['uid'],'ljpost','lj_username'));
$lj_password = xmlify(PConfig::get($b['uid'],'ljpost','lj_password'));
$lj_journal = xmlify(PConfig::get($b['uid'],'ljpost','lj_journal'));
$lj_username = XML::escape(PConfig::get($b['uid'],'ljpost','lj_username'));
$lj_password = XML::escape(PConfig::get($b['uid'],'ljpost','lj_password'));
$lj_journal = XML::escape(PConfig::get($b['uid'],'ljpost','lj_journal'));
// if(! $lj_journal)
// $lj_journal = $lj_username;
$lj_blog = xmlify(PConfig::get($b['uid'],'ljpost','lj_blog'));
$lj_blog = XML::escape(PConfig::get($b['uid'],'ljpost','lj_blog'));
if(! strlen($lj_blog))
$lj_blog = xmlify('http://www.livejournal.com/interface/xmlrpc');
$lj_blog = XML::escape('http://www.livejournal.com/interface/xmlrpc');
if($lj_username && $lj_password && $lj_blog) {
$title = xmlify($b['title']);
$title = XML::escape($b['title']);
$post = BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$tags = ljpost_get_tags($b['tag']);
$date = DateTimeFormat::convert($b['created'], $tz);
@ -231,12 +233,12 @@ function ljpost_send(&$a,&$b) {
EOT;
logger('ljpost: data: ' . $xml, LOGGER_DATA);
Logger::log('ljpost: data: ' . $xml, Logger::DATA);
if ($lj_blog !== 'test') {
$x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"]);
$x = Network::post($lj_blog, $xml, ["Content-Type: text/xml"])->getBody();
}
logger('posted to livejournal: ' . ($x) ? $x : '', LOGGER_DEBUG);
Logger::log('posted to livejournal: ' . ($x) ? $x : '', Logger::DEBUG);
}
}

View file

@ -26,7 +26,7 @@ function mahjongg_module() {}
function mahjongg_content(&$a) {
$baseurl = $a->get_baseurl() . '/addon/mahjongg';
$baseurl = $a->getBaseURL() . '/addon/mahjongg';
$o .= <<< EOT
<br><br>

View file

@ -10,7 +10,9 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Network;
use Friendica\Model\Item;
@ -73,28 +75,28 @@ function mailstream_module() {}
function mailstream_addon_admin(&$a,&$o) {
$frommail = Config::get('mailstream', 'frommail');
$template = get_markup_template('admin.tpl', 'addon/mailstream/');
$template = Renderer::getMarkupTemplate('admin.tpl', 'addon/mailstream/');
$config = ['frommail',
L10n::t('From Address'),
$frommail,
L10n::t('Email address that stream items will appear to be from.')];
$o .= replace_macros($template, [
$o .= Renderer::replaceMacros($template, [
'$frommail' => $config,
'$submit' => L10n::t('Save Settings')]);
}
function mailstream_addon_admin_post ($a) {
if (x($_POST, 'frommail')) {
if (!empty($_POST['frommail'])) {
Config::set('mailstream', 'frommail', $_POST['frommail']);
}
}
function mailstream_generate_id($a, $uri) {
// http://www.jwz.org/doc/mid.html
$host = $a->get_hostname();
$host = $a->getHostName();
$resource = hash('md5', $uri);
$message_id = "<" . $resource . "@" . $host . ">";
logger('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri, LOGGER_DEBUG);
Logger::log('mailstream: Generated message ID ' . $message_id . ' for URI ' . $uri, Logger::DEBUG);
return $message_id;
}
@ -123,16 +125,16 @@ function mailstream_post_hook(&$a, &$item) {
intval($item['contact-id']), DBA::escape($item['uri']), DBA::escape($message_id));
$r = q('SELECT * FROM `mailstream_item` WHERE `uid` = %d AND `contact-id` = %d AND `uri` = "%s"', intval($item['uid']), intval($item['contact-id']), DBA::escape($item['uri']));
if (count($r) != 1) {
logger('mailstream_post_remote_hook: Unexpected number of items returned from mailstream_item', LOGGER_INFO);
Logger::log('mailstream_post_remote_hook: Unexpected number of items returned from mailstream_item', Logger::INFO);
return;
}
$ms_item = $r[0];
logger('mailstream_post_remote_hook: created mailstream_item '
Logger::log('mailstream_post_remote_hook: created mailstream_item '
. $ms_item['id'] . ' for item ' . $item['uri'] . ' '
. $item['uid'] . ' ' . $item['contact-id'], LOGGER_DATA);
. $item['uid'] . ' ' . $item['contact-id'], Logger::DATA);
$user = mailstream_get_user($item['uid']);
if (!$user) {
logger('mailstream_post_remote_hook: no user ' . $item['uid'], LOGGER_INFO);
Logger::log('mailstream_post_remote_hook: no user ' . $item['uid'], Logger::INFO);
return;
}
mailstream_send($a, $ms_item['message-id'], $item, $user);
@ -141,7 +143,7 @@ function mailstream_post_hook(&$a, &$item) {
function mailstream_get_user($uid) {
$r = q('SELECT * FROM `user` WHERE `uid` = %d', intval($uid));
if (count($r) != 1) {
logger('mailstream_post_remote_hook: Unexpected number of users returned', LOGGER_INFO);
Logger::log('mailstream_post_remote_hook: Unexpected number of users returned', Logger::INFO);
return;
}
return $r[0];
@ -152,7 +154,7 @@ function mailstream_do_images($a, &$item, &$attachments) {
return;
}
$attachments = [];
$baseurl = $a->get_baseurl();
$baseurl = $a->getBaseURL();
preg_match_all("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", $item["body"], $matches1);
preg_match_all("/\[img\](.*?)\[\/img\]/ism", $item["body"], $matches2);
foreach (array_merge($matches1[3], $matches2[1]) as $url) {
@ -287,10 +289,10 @@ function mailstream_send($a, $message_id, $item, $user) {
}
$mail->IsHTML(true);
$mail->CharSet = 'utf-8';
$template = get_markup_template('mail.tpl', 'addon/mailstream/');
$template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/');
$item['body'] = BBCode::convert($item['body']);
$item['url'] = $a->get_baseurl() . '/display/' . $user['nickname'] . '/' . $item['id'];
$mail->Body = replace_macros($template, [
$item['url'] = $a->getBaseURL() . '/display/' . $user['nickname'] . '/' . $item['id'];
$mail->Body = Renderer::replaceMacros($template, [
'$upstream' => L10n::t('Upstream'),
'$local' => L10n::t('Local'),
'$item' => $item]);
@ -298,11 +300,11 @@ function mailstream_send($a, $message_id, $item, $user) {
if (!$mail->Send()) {
throw new Exception($mail->ErrorInfo);
}
logger('mailstream_send sent message ' . $mail->MessageID . ' ' . $mail->Subject, LOGGER_DEBUG);
Logger::log('mailstream_send sent message ' . $mail->MessageID . ' ' . $mail->Subject, Logger::DEBUG);
} catch (phpmailerException $e) {
logger('mailstream_send PHPMailer exception sending message ' . $message_id . ': ' . $e->errorMessage(), LOGGER_INFO);
Logger::log('mailstream_send PHPMailer exception sending message ' . $message_id . ': ' . $e->errorMessage(), Logger::INFO);
} catch (Exception $e) {
logger('mailstream_send exception sending message ' . $message_id . ': ' . $e->getMessage(), LOGGER_INFO);
Logger::log('mailstream_send exception sending message ' . $message_id . ': ' . $e->getMessage(), Logger::INFO);
}
// In case of failure, still set the item to completed. Otherwise
// we'll just try to send it over and over again and it'll fail
@ -331,10 +333,10 @@ function mailstream_cron($a, $b) {
// mailstream_post_remote_hook fails for some reason will this get
// used, and in that case it's worth holding off a bit anyway.
$ms_item_ids = q("SELECT `mailstream_item`.`message-id`, `mailstream_item`.`uri`, `item`.`id` FROM `mailstream_item` JOIN `item` ON (`mailstream_item`.`uid` = `item`.`uid` AND `mailstream_item`.`uri` = `item`.`uri` AND `mailstream_item`.`contact-id` = `item`.`contact-id`) WHERE `mailstream_item`.`completed` IS NULL AND `mailstream_item`.`created` < DATE_SUB(NOW(), INTERVAL 1 HOUR) AND `item`.`visible` = 1 ORDER BY `mailstream_item`.`created` LIMIT 100");
logger('mailstream_cron processing ' . count($ms_item_ids) . ' items', LOGGER_DEBUG);
Logger::log('mailstream_cron processing ' . count($ms_item_ids) . ' items', Logger::DEBUG);
foreach ($ms_item_ids as $ms_item_id) {
if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) {
logger('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id', LOGGER_INFO);
Logger::log('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id', Logger::INFO);
}
$item = Item::selectFirst([], ['id' => $ms_item_id['id']]);
$users = q("SELECT * FROM `user` WHERE `uid` = %d", intval($item['uid']));
@ -343,7 +345,7 @@ function mailstream_cron($a, $b) {
mailstream_send($a, $ms_item_id['message-id'], $item, $user);
}
else {
logger('mailstream_cron: Unable to find item ' . $ms_item_id['id'], LOGGER_INFO);
Logger::log('mailstream_cron: Unable to find item ' . $ms_item_id['id'], Logger::INFO);
q("UPDATE `mailstream_item` SET `completed` = now() WHERE `message-id` = %d", intval($ms_item['message-id']));
}
}
@ -355,8 +357,8 @@ function mailstream_addon_settings(&$a,&$s) {
$address = PConfig::get(local_user(), 'mailstream', 'address');
$nolikes = PConfig::get(local_user(), 'mailstream', 'nolikes');
$attachimg= PConfig::get(local_user(), 'mailstream', 'attachimg');
$template = get_markup_template('settings.tpl', 'addon/mailstream/');
$s .= replace_macros($template, [
$template = Renderer::getMarkupTemplate('settings.tpl', 'addon/mailstream/');
$s .= Renderer::replaceMacros($template, [
'$enabled' => [
'mailstream_enabled',
L10n::t('Enabled'),
@ -412,5 +414,5 @@ function mailstream_tidy() {
foreach ($r as $rr) {
q('DELETE FROM mailstream_item WHERE id = %d', intval($rr['id']));
}
logger('mailstream_tidy: deleted ' . count($r) . ' old items', LOGGER_DEBUG);
Logger::log('mailstream_tidy: deleted ' . count($r) . ' old items', Logger::DEBUG);
}

View file

@ -6,6 +6,7 @@
* Version: 1.0
* Author: Hypolite Petovan
* Author: Roland Haeder
* Status: Unsupported
*/
use Friendica\App;
@ -54,8 +55,8 @@ HTML;
function mastodoncustomemojis_put_item_in_cache(App $a, array &$hook_data)
{
// Mastodon uses OStatus, skipping other network protocols
if (empty($hook_data['item']['author-link']) || ($hook_data['item']['network'] != Protocol::OSTATUS)) {
// Mastodon uses OStatus and ActivityPub, skipping other network protocols
if (empty($hook_data['item']['author-link']) || !in_array($hook_data['item']['network'], [Protocol::OSTATUS, Protocol::ACTIVITYPUB])) {
return;
}
@ -77,7 +78,7 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link)
if (empty($return) || Config::get('system', 'ignore_cache')) {
$return = mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url);
Cache::set($cache_key, $return, empty($return['texts']) ? Cache::HALF_HOUR : Cache::WEEK);
Cache::set($cache_key, $return, empty($return['texts']) ? Cache::QUARTER_HOUR : Cache::HOUR);
}
return $return;
@ -89,15 +90,17 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url)
$api_url = $api_base_url . '/api/v1/custom_emojis';
$ret = Network::fetchUrlFull($api_url);
$fetchResult = Network::fetchUrlFull($api_url);
if ($ret['success']) {
$emojis_array = json_decode($ret['body'], true);
if ($fetchResult->isSuccess()) {
$emojis_array = json_decode($fetchResult->getBody(), true);
if (is_array($emojis_array) && count($emojis_array)) {
foreach ($emojis_array as $emoji) {
$return['texts'][] = ':' . $emoji['shortcode'] . ':';
$return['icons'][] = '<img class="emoji mastodon" src="' . ProxyUtils::proxifyUrl($emoji['static_url']) . '" alt=":' . $emoji['shortcode'] . ':" title=":' . $emoji['shortcode'] . ':"/>';
if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) {
$return['texts'][] = ':' . $emoji['shortcode'] . ':';
$return['icons'][] = '<img class="emoji mastodon" src="' . ProxyUtils::proxifyUrl($emoji['static_url']) . '" alt=":' . $emoji['shortcode'] . ':" title=":' . $emoji['shortcode'] . ':"/>';
}
}
}
}

View file

@ -21,15 +21,19 @@ In case you want to use the CDN you can try the following URL as a quick start
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
In case you don't want or can use the admin panel of Friendica you can activate
the addon by adding _mathjax_ to the list in your config/local.ini.php file
the addon by adding _mathjax_ to the list in your `config/local.config.php` file
[system]
addon = ...,mathjax
'system' => [
...
'addon' => '...,mathjax'
...
]
and then providing the base URL after that in the config/addon.ini.php file
and then providing the base URL after that in the `config/addon.config.php` file
[mathjax]
baseurl = [the URL to your MathJax installation];
'mathjax' => [
'baseurl' => '[the URL to your MathJax installation]',
],
Usage
=====

6
mathjax/asset/.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
.DS_Store
docs/build/html-mathjax-site
config/local/*.js
!config/local/local.js
unpacked/config/local/*.js
!unpacked/config/local/local.js

7
mathjax/asset/.npmignore Normal file
View file

@ -0,0 +1,7 @@
.DS_Store
docs/build/html-mathjax-site
config/local/*.js
!config/local/local.js
unpacked/config/local/*.js
!unpacked/config/local/local.js
fonts/HTML-CSS/TeX/png

17
mathjax/asset/.travis.yml Normal file
View file

@ -0,0 +1,17 @@
language: node_js
node_js:
- stable
sudo: false
script:
- npm install
- npm test
branches:
only:
- "/^\\d+\\.\\d+/"
deploy:
provider: npm
email: manager@mathjax.org
api_key:
secure: cTkds6AqvCrkE9lAbBBjyDy7swjQEsGTCvLcjEyJemWH7ciNmtbwQ+Mzpk5bsL1i734CS29fTUBY05bPdwhBXB19yC0LzDfuNd2OKd1GhKa5OUig3d3+iNZEb/bhlEL/N2pM3pNBLT3+HDWBWVPPzDOCgSHYf355WmNlFIxrUtWbQQ7w5cX1d6ZKHVDkO0s9cl9eIQkX5aIKpsQM/N/tfkqPlF3OZuseTg7TU1wL+g6zqtsa0a1uhjXiCSRfDzgi4e2FUg9OBJHInbRho7MoZ9c8NrgCDTqwh1xJVAgi50HZpFAlhw3bBvWMzWLESLKUgmDOQc1/jzq6EhdUY1HMmryHPtvFIlyj0mWH88lZjUOqsCntG+t874ONYGkHF7I5q9VsX5LJNiZzASeXMymA1BP3fC33s/vGXen1H90JpdlGQXQvIXn6ZIQ9UiI1/bONuxVEUghnVRZHLTe2Nhy7s2s0OHTN23PmDVPHSzuM1FjEXXFaza/dGgOfi0ACRBPcqopQ2wxuCVDlmrrL+3r2o4Tp5F3f49KIrqNwO/GSnWX5H7GgxHKSh7CK1rUwqcpTumwYfY1Do/xdlu2D3I/IjZXO9TzDtZYJG1ye0BVTh44cECfBgBIZVmRH56Yjo5MvKEQwSSFfETKW4PKWoahbZIC4V99YWhoRqYqtb+OT0ow=
on:
tags: true

View file

@ -0,0 +1,259 @@
# Contributing to MathJax
You are interested in giving us a hand? That's awesome! We've put together some brief guidelines that should help you get started quickly and easily.
There are lots and lots of ways to get involved, this document covers:
* [reporting an issue](#reporting-an-issue)
* [bug reports](#bug-reports)
* [feature requests](#feature-requests)
* [change requests](#change-requests)
* [working on MathJax core](#working-on-mathjax-core)
* [key branches and tags](#key-branches--tags)
* [submitting pull requests](#submitting-pull-requests)
* [testing and quality assurance](#testing-and-quality-assurance)
* [writing documentation](#writing-documentation)
* [translation](#translation)
* [Conduct](#conduct)
## Reporting An Issue
If you're about to raise an issue because you think you've found a
problem with MathJax, or you'd like to make a request for a new
feature in the codebase, or any other reason… please read this first.
The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports),
[feature requests](#feature-requests), [change requests](#change-requests) and [submitting pull
requests](#submitting-pull-requests), but please respect the following restrictions:
* Please **search for existing issues**. Help us keep duplicate issues
to a minimum by checking to see if someone has already reported your
problem or requested your idea.
* Please **do not** use the issue tracker for personal support
requests (use [the MathJax User Group](https://groups.google.com/forum/#!forum/mathjax-users)).
* Please **be civil**. Keep the discussion on topic and respect the
opinions of others. See also our [Conduct Guidelines](#conduct)
### Bug Reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.
2. **Check if the issue has been fixed** &mdash; look for [closed issues in the
current milestone](https://github.com/MathJax/MathJax/issues?&page=1&state=closed) or try to reproduce it
using the latest `develop` branch. Please note that we only pack MathJax for releases, so on the `develop` branch you have to use `/unpacked/MathJax.js` etc. to test.
3. **Share a live sample of the problem** &mdash; without a live page it is usually impossible to debug problems; see also the Bug Report Template below.
4. **Isolate the problem** &mdash; a live sample is a starting point but if you want to speed things up create a [reduced test
case](http://css-tricks.com/6263-reduced-test-cases/). Be specific about your setup (browser, OS versions etc). Use services like [jsbin](http://jsbin.com), [CodePen](http://codepen.io), [JSfiddle](http://jsfiddle.com) to make collaboration on minimal test cases easier for everyone. Use the unpacked copy of MathJax (`[...]/unpacked/MathJax.js` etc.) for better debugging.
5. **Include a screenshot/cast as a last resort** &mdash; Is your issue about a layout
or design feature / bug but hard to reproduce or isolate? Then please provide a screenshot or screencast. Tools like [LICEcap](http://www.cockos.com/licecap/) or [SauceLabs](http://www.saucelabs.com) allow you to quickly and easily record a screencasts. Make it an animated gif, embed it directly into your GitHub issue -- kapow!
6. Use the Bug Report template below or [click this
link](https://github.com/MathJax/MathJax/issues/new?title=Bug%3A&body=%23%23%23%20Issue%20Summary%0A%0A%23%23%23%20Steps%20to%20Reproduce%0A%0A1.%20This%20is%20the%20first%20step%0A%0AThis%20is%20a%20bug%20because...%0A%0A%23%23%23%20Technical%20details%0A%0A*%20MathJax%20Version%3A%20master%20-%20latest%20commit%3A%20%20INSERT%20COMMIT%20REF%0A*%20Client%20OS%3A%20%0A*%20Browser%3A%20%0A*%20)
to start creating a bug report with the template automatically.
A good bug report shouldn't leave others needing to chase you up for
more information. Be sure to include the details of your environment.
Here is a [real example](https://github.com/mathjax/MathJax/issues/820)
Template Example ([click to use](https://github.com/MathJax/MathJax/issues/new?title=Bug%3A&body=%23%23%23%20Issue%20Summary%0A%0A%23%23%23%20Steps%20to%20Reproduce%0A%0A1.%20This%20is%20the%20first%20step%0A%0AThis%20is%20a%20bug%20because...%0A%0A%23%23%23%20Technical%20details%0A%0A*%20MathJax%20Version%3A%20master%20-%20latest%20commit%3A%20%20INSERT%20COMMIT%20REF%0A*%20Client%20OS%3A%20%0A*%20Browser%3A%20%0A*%20)):
```
Short and descriptive example bug report title
### Issue Summary
A summary of the issue and the browser/OS environment in which it occurs. If
suitable, include the steps required to reproduce the bug.
### Steps to Reproduce
1. This is the first step
2. This is the second step
3. Further steps, etc.
Any other information you want to share that is relevant to the issue
being reported. Especially, why do you consider this to be a bug? What
do you expect to happen instead?
### Technical details:
* MathJax Version: 2.3 (latest commit: f3aaf3a2a3e964df2770dc4aaaa9c87ce5f47e2c)
* Client OS: Mac OS X 10.8.4
* Browser: Chrome 29.0.1547.57
```
### Feature Requests
Feature requests are welcome. Before you submit one be sure to have:
1. Read the
[Roadmaps](https://github.com/mathjax/MathJax/wiki/Mathjax-roadmap),
**use the GitHub search** and check the feature hasn't already been
requested.
2. Take a moment to think about whether your idea fits with the scope
and aims of the project, or if it might better fit being a [custom
extension](https://github.com/mathjax/MathJax-third-party-extensions).
3. Remember, it's up to *you* to make a strong case to convince the
project's leaders of the merits of this feature. Please provide as
much detail and context as possible, this means explaining the use
case and why it is likely to be common.
4. Clearly indicate whether this is a feature request for MathJax
core, input & output jax, or extensions.
### Change Requests
Change requests cover both architectural and functional changes to how
MathJax works. If you have an idea for a new or different dependency,
a refactor, or an improvement to a feature, etc - please be sure to:
1. **Use the GitHub search** and check someone else didn't get there first
2. Take a moment to think about the best way to make a case for, and
explain what you're thinking. Are you sure this shouldn't really be
a [bug report](#bug-reports) or a [feature
request](#feature-requests)? Is it really one idea or is it many?
What's the context? What problem are you solving? Why is what you
are suggesting better than what's already there? Does it fit with
the Roadmap?
## Working on MathJax core
You want to contribute code? Fantastic! Let's get you started.
### Key Branches & Tags
To get it out of the way:
- **[develop](https://github.com/MathJax/MathJax/tree/develop)** is
the development branch. All work on the next release happens here so
you should generally branch off `develop`. Do **NOT** use this branch
for a production site.
- **[master](https://github.com/MathJax/MathJax)** contains the latest
release of MathJax. This branch may be used in production. Do
**NOT** use this branch to work on MathJax's source.
### Submitting Pull Requests
Pull requests are awesome. If you're looking to raise a PR for
something which doesn't have an open issue, please think carefully
about [raising an issue](#reporting-an-issue) which your PR can close,
especially if you're fixing a bug. This makes it more likely that
there will be enough information available for your PR to be properly
tested and merged.
##### Need Help?
If you're not completely clear on how to submit / update / *do* Pull
Requests, please check out our [source control
policies](https://github.com/mathjax/MathJax/wiki/Source-control-policies). For
more insights, chech the excellent in depth [Git Workflow
guide](https://github.com/TryGhost/Ghost/wiki/Git-Workflow) from
Ghost, in particular
* [Ghost Workflow guide: commit messages](https://github.com/TryGhost/Ghost/wiki/Git-workflow#commit-messages)
### Testing and Quality Assurance
Never underestimate just how useful quality assurance is. If you're
looking to get involved with the code base and don't know where to
start, checking out and testing a pull request is one of the most
useful things you could do.
If you want to get involved with testing MathJax, there is a set of QA
Documentation [in our testing
framework](https://github.com/MathJax/MathJax-test).
Essentially though, [check out the latest develop
branch](#working-on-mathJax-core), take it for a spin, and if you find
anything odd, please follow the [bug report guidelines](#bug-reports)
and let us know!
#### Checking out a Pull Request
These are some [excellent
instructions](https://gist.github.com/piscisaureus/3342247) on
configuring your GitHub repository to allow you to checkout pull
requests in the same way as branches:
<https://gist.github.com/piscisaureus/3342247>.
### Writing documentation
MathJax's main documentation can be found at [docs.mathjax.org](http://docs.mathjax.org).
The source of the docs is hosted in the
[mathjax/mathjax-docs](http://github.com/mathjax/mathjax-docs) repo here on GitHub.
The documentation is generated using [Sphinx-doc](http://sphinx-doc.org/) and hosted on
[Read the docs](http://readthedocs.org).
You can clone the repo and submit pull requests following the
[pull-request](#submitting-pull-requests) guidelines.
### Translation
If you wish to add or update translations of MathJax, please do it on
[TranslateWiki.net](https://translatewiki.net/w/i.php?title=Special:Translate&group=out-mathjax-0-all)
(and while you're there you can help other open source projects,
too, because you're awesome!).
For bug reports and other questions that don't fit on
TranslateWiki.net, head over to the
[mathjax/mathjax-i18n](https://github.com/mathjax/MathJax-i18n)
repository.
## Conduct
We are committed to providing a friendly, safe and welcoming environment for
all, regardless of gender, sexual orientation, disability, ethnicity, religion,
or similar personal characteristic.
Please be kind and courteous. There's no need to be mean or rude.
Respect that people have differences of opinion and that every design or
implementation choice carries a trade-off and numerous costs. There is seldom
a right answer, merely an optimal answer given a set of values and
circumstances.
Please keep unstructured critique to a minimum. If you have solid ideas you
want to experiment with, make a fork and see how it works.
We will exclude you from interaction if you insult, demean or harass anyone.
That is not welcome behaviour. We interpret the term "harassment" as
including the definition in the
[Citizen Code of Conduct](http://citizencodeofconduct.org/);
if you have any lack of clarity about what might be included in that concept,
please read their definition. In particular, we don't tolerate behavior that
excludes people in socially marginalized groups.
Private harassment is also unacceptable. No matter who you are, if you feel
you have been or are being harassed or made uncomfortable by a community
member, please contact one of the channel ops or any of the
[MathJax](https://github.com/MathJax/MathJax) core team
immediately. Whether you're a regular contributor or a newcomer, we care about
making this community a safe place for you and we've got your back.
Likewise any spamming, trolling, flaming, baiting or other attention-stealing
behaviour is not welcome.
We also suggest to read [discourse's
rules](http://blog.discourse.org/2013/03/the-universal-rules-of-civilized-discourse/)
## References
* We heavily borrowed from Mozilla and Ghost -- thank you!
* https://github.com/TryGhost/Ghost/blob/master/CONTRIBUTING.md
* https://github.com/mozilla/rust/wiki/Note-development-policy
* https://github.com/jden/CONTRIBUTING.md/blob/master/CONTRIBUTING.md
* http://blog.discourse.org/2013/03/the-universal-rules-of-civilized-discourse/

202
mathjax/asset/LICENSE Normal file
View file

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

19
mathjax/asset/MathJax.js Normal file

File diff suppressed because one or more lines are too long

53
mathjax/asset/README.md Normal file
View file

@ -0,0 +1,53 @@
# MathJax
## Beautiful math in all browsers
MathJax is an open-source JavaScript display engine for LaTeX, MathML, and
AsciiMath notation that works in all modern browsers. It was designed with
the goal of consolidating the recent advances in web technologies into a
single, definitive, math-on-the-web platform supporting the major browsers
and operating systems. It requires no setup on the part of the user (no
plugins to download or software to install), so the page author can write
web documents that include mathematics and be confident that users will be
able to view it naturally and easily. Simply include MathJax and some
mathematics in a web page, and MathJax does the rest.
Some of the main features of MathJax include:
- High-quality display of LaTeX, MathML, and AsciiMath notation in HTML pages
- Supported in most browsers with no plug-ins, extra fonts, or special
setup for the reader
- Easy for authors, flexible for publishers, extensible for developers
- Supports math accessibility, cut-and-paste interoperability, and other
advanced functionality
- Powerful API for integration with other web applications
See <http://www.mathjax.org/> for additional details.
## Installation and Usage
The MathJax installation and usage documentation is available in a
separate GitHub repository at <https://github.com/mathjax/mathjax-docs>.
The HTML versions can now be viewed at <http://docs.mathjax.org/>,
where it is possible for you to submit corrections and modifications
directly to the documentation on line.
## Community
The main MathJax website is <http://www.mathjax.org>, and it includes
announcements and other important information. MathJax is maintained and
distributed on GitHub at <http://github.com/mathjax/MathJax>. A user forum
for asking questions and getting assistance is hosted at Google, and the
bug tracker is hosted at GitHub:
Bug tracker: <https://github.com/mathjax/MathJax/issues>
MathJax-Users Group: <http://groups.google.com/group/mathjax-users>
Before reporting a bug, please check that it has not already been reported.
Also, please use the bug tracker for reporting bugs rather than the help forum.

11
mathjax/asset/bower.json Normal file
View file

@ -0,0 +1,11 @@
{
"name": "MathJax",
"main": "./MathJax.js",
"homepage": "http://www.mathjax.org/",
"ignore": [
"**/.*",
"node_modules",
"components"
],
"keywords": ["math", "js", "LaTeX", "MathML", "AsciiMath"]
}

View file

@ -0,0 +1,14 @@
{
"name": "mathjax/mathjax",
"type": "library",
"description": "MathJax is an open-source JavaScript display engine for LaTeX, MathML, and AsciiMath notation that works in all modern browsers.",
"keywords": ["math", "js", "LaTeX", "MathML", "AsciiMath"],
"homepage": "http://www.mathjax.org/",
"license": "Apache-2.0",
"authors": [
{
"name": "MathJax Consortium",
"homepage": "https://github.com/mathjax"
}
]
}

View file

@ -0,0 +1,19 @@
/*
* /MathJax/config/Safe.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Register.StartupHook("End Config",function(){if(!MathJax.Hub.config.extensions){MathJax.Hub.config.extensions=[]}MathJax.Hub.config.extensions.push("Safe.js")});MathJax.Ajax.loadComplete("[MathJax]/config/Safe.js");

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,1104 @@
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/config/default.js
*
* This configuration file is loaded when you load MathJax
* via <script src="MathJax.js?config=default"></script>
*
* Use it to customize the MathJax settings. See comments below.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This file lists most, but not all, of the options that can be set for
* MathJax and its various components. Some additional options are
* available, however, and are listed in the various links at:
*
* http://www.mathjax.org/resources/docs/?configuration.html#configuration-options-by-component
*
* You can add these to the configuration object below if you
* want to change them from their default values.
*/
MathJax.Hub.Config({
//
// A comma-separated list of configuration files to load
// when MathJax starts up. E.g., to define local macros, etc.
// The default directory is the MathJax/config directory.
//
// Example: config: ["local/local.js"],
// Example: config: ["local/local.js","MMLtoHTML.js"],
//
config: [],
//
// A comma-separated list of CSS stylesheet files to be loaded
// when MathJax starts up. The default directory is the
// MathJax/config directory.
//
// Example: styleSheets: ["MathJax.css"],
//
styleSheets: [],
//
// Styles to be defined dynamically at startup time.
//
// Example:
// styles: {
// ".MathJax_Preview": {
// color: "#888"
// }
// },
//
styles: {},
//
// A comma-separated list of input and output jax to initialize at startup.
// Their main code is loaded only when they are actually used, so it is not
// inefficient to include jax that may not actually be used on the page. These
// are found in the MathJax/jax directory. The choices include
//
// input/TeX
// input/MathML
// input/AsciiMath
//
// output/HTML-CSS
// output/NativeMML
// output/SVG
//
// If you change the input jax, you may need to include the appropriate
// preprocessor in the extensions array below.
//
jax: ["input/TeX", "output/HTML-CSS"],
//
// A comma-separated list of extensions to load at startup. The default
// directory is MathJax/extensions.
//
// Example: extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"],
//
// You may wish to include "mml2jax.js" if you are using "input/MathML" in the
// jax array above, and "asciimath2jax.js" if you using "input/AsciiMath".
// Include "jsmath2jax.js" if you are converting from using jsMath to MathJax.
//
extensions: ["tex2jax.js"],
//
// Patterns to remove from before and after math script tags. If you are not
// using one of the preprocessors (e.g., tex2jax), you need to insert something
// extra into your HTML file in order to avoid a bug in Internet Explorer. IE
// removes spaces from the DOM that it thinks are redundent, and since a SCRIPT
// tag usually doesn't add content to the page, if there is a space before and after
// a MathJax SCRIPT tag, IE will remove the first space. When MathJax inserts
// the typeset mathematics, this means there will be no space before it and the
// preceding text. In order to avoid this, you should include some "guard characters"
// before or after the math SCRIPT tag; define the patterns you want to use below.
// Note that these are used as regular expressions, so you will need to quote
// special characters. Furthermore, since they are javascript strings, you must
// quote javascript special characters as well. So to obtain a backslash, you must
// use \\ (doubled for javascript). For example, "\\[" is the pattern \[ in the
// regular expression. That means that if you want an actual backslash in your
// guard characters, you need to use "\\\\" in order to get \\ in the regular
// expression, and \ in the actual text. If both preJax and postJax are defined,
// both must be present in order to be removed.
//
// See also the preRemoveClass comments below.
//
// Example:
// preJax: "\\\\\\\\", // makes a double backslash the preJax text
// or
// preJax: "\\[\\[", // jax scripts must be enclosed in double brackets
// postJax: "\\]\\]",
//
preJax: null,
postJax: null,
//
// The CSS class for a math preview to be removed preceding a MathJax
// SCRIPT tag. If the tag just before the MathJax SCRIPT tag is of this
// class, its contents are removed when MathJax processes the SCRIPT
// tag. This allows you to include a math preview in a form that will
// be displayed prior to MathJax performing its typesetting. It also
// avoids the Internet Explorer space-removal bug, and can be used in
// place of preJax and postJax if that is more convenient.
//
// For example
//
// <span class="MathJax_Preview">[math]</span><script type="math/tex">...</script>
//
// would display "[math]" in place of the math until MathJax is able to typeset it.
//
preRemoveClass: "MathJax_Preview",
//
// This value controls whether the "Processing Math: nn%" message are displayed
// in the lower left-hand corner. Set to "false" to prevent those messages (though
// file loading and other messages will still be shown).
//
showProcessingMessages: true,
//
// This value controls the verbosity of the messages in the lower left-hand corner.
// Set it to "none" to eliminate all messages, or set it to "simple" to show
// "Loading..." and "Processing..." rather than showing the full file name and the
// percentage of the mathematics processed.
//
messageStyle: "normal",
//
// These two parameters control the alignment and shifting of displayed equations.
// The first can be "left", "center", or "right", and determines the alignment of
// displayed equations. When the alignment is not "center", the second determines
// an indentation from the left or right side for the displayed equations. When
// the alignment is "center", the indent allows you to shift the center to the right
// or left (negative is left).
//
displayAlign: "center",
displayIndent: "0",
//
// Normally MathJax will perform its starup commands (loading of
// configuration, styles, jax, and so on) as soon as it can. If you
// expect to be doing additional configuration on the page, however, you
// may want to have it wait until the page's onload hander is called. If so,
// set this to "onload".
//
delayStartupUntil: "none",
//
// Normally MathJax will typeset the mathematics on the page as soon as
// the page is loaded. If you want to delay that process, in which case
// you will need to call MathJax.Hub.Typeset() yourself by hand, set
// this value to true.
//
skipStartupTypeset: false,
//
// A list of element ID's that are the ones to process for mathematics
// when any of the Hub typesetting calls (Typeset, Process, Update, etc)
// are called with no element specified. This lets you restrict the
// processing to particular containers rather than scanning the entire
// document for mathematics. If none are supplied, the entire document
// is processed.
//
elements: [],
//
// Since typesetting usually changes the vertical dimensions of the
// page, if the URL contains an anchor position you may no longer be
// positioned at the correct position on the page, so MathJax can
// reposition to that location after it completes its initial
// typesetting of the page. This value controls whether MathJax will
// reposition the browser to the #hash location from the page URL after
// typesetting for the page.
//
positionToHash: true,
//
// These control whether to attach the MathJax contextual menu to the
// expressions typeset by MathJax. Since the code for handling
// MathPlayer in Internet Explorer is somewhat delicate, it is
// controlled separately via (showMathMenuMSIE). The latter is now
// deprecated in favor of the MathJax contextual menu settings for
// MathPlayer.
//
// These values used to be listed in the separate output jax, but
// have been moved to this more central location since they are shared
// by all output jax.
//
showMathMenu: true,
showMathMenuMSIE: true,
//
// The default settings for the MathJax contextual menu (overridden by
// the MathJax cookie when users change the menu settings).
//
menuSettings: {
zoom: "None", // when to do MathZoom
CTRL: false, // require CTRL for MathZoom?
ALT: false, // require Alt or Option?
CMD: false, // require CMD?
Shift: false, // require Shift?
discoverable: false, // make math menu discoverable on hover?
zscale: "200%", // the scaling factor for MathZoom
renderer: null, // set when Jax are loaded
font: "Auto", // what font HTML-CSS should use
context: "MathJax", // or "Browser" for pass-through to browser menu
locale: null, // the language to use for messages
mpContext: false, // true means pass menu events to MathPlayer in IE
mpMouse: false, // true means pass mouse events to MathPlayer in IE
texHints: true, // include class names for TeXAtom elements
FastPreview: null, // use PreviewHTML output as preview?
assistiveMML: null, // include hidden MathML for screen readers?
inTabOrder: true, // set to true if math elements should be included in the tabindex
semantics: false // add semantics tag with original form in MathML output
},
//
// The message and style for when there is a processing error handling
// the mathematics (something has gone wrong with the input or output
// jax that prevents it from operating properly).
//
errorSettings: {
message: ["[",["MathProcessingError","Math Processing Error"],"]"],
style: {color: "#CC0000", "font-style":"italic"} // style for message
},
//============================================================================
//
// These parameters control the tex2jax preprocessor (when you have included
// "tex2jax.js" in the extensions list above).
//
tex2jax: {
//
// The delimiters that surround in-line math expressions. The first in each
// pair is the initial delimiter and the second is the terminal delimiter.
// Comment out any that you don't want, but be sure there is no extra
// comma at the end of the last item in the list -- some browsers won't
// be able to handle that.
//
inlineMath: [
// ['$','$'], // uncomment this for standard TeX math delimiters
['\\(','\\)']
],
//
// The delimiters that surround displayed math expressions. The first in each
// pair is the initial delimiter and the second is the terminal delimiter.
// Comment out any that you don't want, but be sure there is no extra
// comma at the end of the last item in the list -- some browsers won't
// be able to handle that.
//
displayMath: [
['$$','$$'],
['\\[','\\]']
],
//
// This array lists the names of the tags whose contents should not be
// processed by tex2jax (other than to look for ignore/process classes
// as listed below). You can add to (or remove from) this list to prevent
// MathJax from processing mathematics in specific contexts.
//
skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],
//
// This is the class name used to mark elements whose contents should
// not be processed by tex2jax (other than to look for the
// processClass pattern below). Note that this is a regular
// expression, and so you need to be sure to quote any regexp special
// characters. The pattern is automatically preceded by '(^| )(' and
// followed by ')( |$)', so your pattern will have to match full words
// in the class name. Assigning an element this class name will
// prevent `tex2jax` from processing its contents.
//
ignoreClass: "tex2jax_ignore",
//
// This is the class name used to mark elements whose contents SHOULD
// be processed by tex2jax. This is used to turn on processing within
// tags that have been marked as ignored or skipped above. Note that
// this is a regular expression, and so you need to be sure to quote
// any regexp special characters. The pattern is automatically
// preceded by '(^| )(' and followed by ')( |$)', so your pattern
// will have to match full words in the class name. Use this to
// restart processing within an element that has been marked as
// ignored above.
//
processClass: "tex2jax_process",
//
// Set to "true" to allow \$ to produce a dollar without starting in-line
// math mode. If you uncomment the ['$','$'] line above, you should change
// this to true so that you can insert plain dollar signs into your documents
//
processEscapes: false,
//
// Controls whether tex2jax processes LaTeX environments outside of math
// mode. Set to "false" to prevent processing of environments except within
// math mode.
//
processEnvironments: true,
//
// Controls whether tex2jax processes \ref{...} commands outside
// of math mode. Set to "false" to prevent processing of \ref
// except within math mode.
//
processRefs: true,
//
// Controls whether tex2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates in-line
// and display mathetics on the page. The default is "TeX", which
// means use the TeX code as the preview (until it is processed by
// MathJax). Set to "none" to prevent the previews from being
// inserted (the math will simply disappear until it is typeset). Set
// to an array containing the description of an HTML snippet in order
// to use the same preview for all equations on the page (e.g., you
// could have it say "[math]" or load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "TeX"
},
//============================================================================
//
// These parameters control the asciimath2jax preprocessor (when you have included
// "asciimath2jax.js" in the extensions list above).
//
asciimath2jax: {
//
// The delimiters that surround asciimath expressions. The first in each
// pair is the initial delimiter and the second is the terminal delimiter.
//
delimiters: [
['`','`']
],
//
// This array lists the names of the tags whose contents should not be
// processed by asciimath2jax (other than to look for ignore/process classes
// as listed below). You can add to (or remove from) this list to prevent
// MathJax from processing mathematics in specific contexts.
//
skipTags: ["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],
//
// This is the class name used to mark elements whose contents should
// not be processed by asciimath2jax (other than to look for the
// processClass pattern below). Note that this is a regular
// expression, and so you need to be sure to quote any regexp special
// characters. The pattern is automatically preceded by '(^| )(' and
// followed by ')( |$)', so your pattern will have to match full words
// in the class name. Assigning an element this class name will
// prevent `asciimath2jax` from processing its contents.
//
ignoreClass: "asciimath2jax_ignore",
//
// This is the class name used to mark elements whose contents SHOULD
// be processed by asciimath2jax. This is used to turn on processing
// within tags that have been marked as ignored or skipped above.
// Note that this is a regular expression, and so you need to be sure
// to quote any regexp special characters. The pattern is
// automatically preceded by '(^| )(' and followed by ')( |$)', so
// your pattern will have to match full words in the class name. Use
// this to restart processing within an element that has been marked
// as ignored above.
//
processClass: "asciimath2jax_process",
// Controls whether asciimath2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates in-line
// and display mathetics on the page. The default is "AsciiMath", which
// means use the AsciiMath code as the preview (until it is processed by
// MathJax). Set to "none" to prevent the previews from being
// inserted (the math will simply disappear until it is typeset). Set
// to an array containing the description of an HTML snippet in order
// to use the same preview for all equations on the page (e.g., you
// could have it say "[math]" or load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "AsciiMath"
},
//============================================================================
//
// These parameters control the mml2jax preprocessor (when you have included
// "mml2jax.js" in the extensions list above).
//
mml2jax: {
//
// Controls whether mml2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates
// mathematics on the page. The default is "mathml" which means use
// the <math> tag as the preview (until it is processed by MathJax).
// Set to "alttext", to use the <math> tag's alttext attribute as the
// preview, if the tag has one. Set to "none" to
// prevent the previews from being inserted (the math will simply
// disappear until it is typeset). Set to "altimg" to use an image
// described by the altimg* attributes of the <math> element.
// Set to an array containing the
// description of an HTML snippet in order to use the same preview for
// all equations on the page (e.g., you could have it say "[math]" or
// load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "mathml"
},
//============================================================================
//
// These parameters control the jsMath2jax preprocessor (when you have included
// "jsMath2jax.js" in the extensions list above).
//
jsMath2jax: {
//
// Controls whether jsMath2jax inserts MathJax_Preview spans to make a
// preview available, and what preview to use, when it locates
// mathematics on the page. The default is "TeX", which means use the
// TeX code as the preview (until it is processed by MathJax). Set to
// "none" to prevent the previews from being inserted (the math will
// simply disappear until it is typeset). Set to an array containing
// the description of an HTML snippet in order to use the same preview
// for all equations on the page (e.g., you could have it say "[math]"
// or load an image).
//
// E.g., preview: ["[math]"],
// or preview: [["img",{src: "http://myserver.com/images/mypic.jpg"}]]
//
preview: "TeX"
},
//============================================================================
//
// These parameters control the TeX input jax.
//
TeX: {
//
// This specifies the side on which \tag{} macros will place the tags.
// Set to "left" to place on the left-hand side.
//
TagSide: "right",
//
// This is the amound of indentation (from right or left) for the tags.
//
TagIndent: "0.8em",
//
// This is the width to use for the multline environment
//
MultLineWidth: "85%",
//
// List of macros to define. These are of the form
// name: value
// where 'value' is the replacement text for the macro \name.
// The 'value' can also be [value,n] where 'value' is the replacement
// text and 'n' is the number of parameters for the macro.
// Note that backslashes must be doubled in the replacement string.
//
// E.g.,
//
// Macros: {
// RR: '{\\bf R}',
// bold: ['{\\bf #1}', 1]
// }
//
Macros: {},
//
// Equation numbering parameters.
//
equationNumbers: {
autoNumber: "none", // "AMS" for standard AMS environment numbering,
// or "all" to number all displayed equations
// formatNumber: function (n) {return n}, // format for equation number n
// formatTag: function (n) {return '('+n+')'}, // format for \tag and \eqref
// formatID: function (n) {return 'mjx-eqn-'+String(n).replace(/\s/g,"_")},
// // element ID to use for reference
// formatURL: function (id,base) {return base+'#'+encodeURIComponent(id)},
// // URL to use for references
useLabelIds: true // make element ID's use \label name rather than equation number
},
//
// Controls the TeX/noErrors extension
//
noErrors: {
disabled: false, // set to true to return to original error messages
multiLine: true, // false to not include original line breaks
inlineDelimiters: ["",""], // or use ["$","$"] or ["\\(","\\)"] to put back delimiters
style: {
"font-size": "90%",
"text-align": "left",
"color": "black",
"padding": "1px 3px",
"border": "1px solid"
}
},
//
// Controls the TeX/noUndefined extension
//
noUndefined: {
disabled: false, // set to true to return to original error messages
attributes: { // attributes to set for the undefined control sequence
mathcolor: "red"
}
},
//
// Controls the TeX/unicode extension
unicode: {
fonts: "STIXGeneral,'Arial Unicode MS'" // the default font list for unknown characters
}
},
//============================================================================
//
// These parameters control the AsciiMath input jax.
//
AsciiMath: {
//
// Determines whether the unicode positions for phi and varphi are
// to be swapped or not. (Unicode originally had these reversed, and
// many fonts have them reversed as well.) When set to true, phi
// and varphi will correspond to the LaTeX macros of the same name.
//
fixphi: true,
//
// Determines whether the MathML should be marked so that the HTML-CSS
// and SVG output jax will use MathML spacing rules rather than TeX
// spacing rules. Since AsciiMath was designed for MathML output, the
// MathML rules are used by default.
//
useMathMLspacing: true,
//
// Determines whether limits are placed above and below operators,
// or next to them. (AsciiMath doesn't have separate in-line and
// display modes like TeX and MathML do, so this is the only control
// you have over its output)
//
displaystyle: true,
//
// The character to use for decimal places when scanning for a number.
// If you change it to ",", beware of things like "(1,2)" which would need
// to be changed to "(1, 2)" to be parsed correctly.
//
decimal: "."
},
//============================================================================
//
// These parameters control the MathML input jax.
//
MathML: {
//
// This specifies whether to use TeX spacing or MathML spacing when the
// HTML-CSS output jax is used.
//
useMathMLspacing: false
},
//============================================================================
//
// These parameters control the HTML-CSS output jax.
//
"HTML-CSS": {
//
// This controls the global scaling of mathematics as compared to the
// surrounding text. Values between 100 and 133 are usually good choices.
//
scale: 100,
//
// Don't allow the matching of math text to surrounding text to use a scaling
// factor smaller than this.
//
minScaleAdjust: 50,
//
// This is a list of the fonts to look for on a user's computer in
// preference to using MathJax's web-based fonts. These must
// correspond to directories available in the jax/output/HTML-CSS/fonts
// directory, where MathJax stores data about the characters available
// in the fonts. Set this to ["TeX"], for example, to prevent the
// use of the STIX fonts, or set it to an empty list, [], if
// you want to force MathJax to use web-based or image fonts.
//
availableFonts: ["STIX","TeX"],
//
// This is the preferred font to use when more than one of those
// listed above is available.
//
preferredFont: "TeX",
//
// This is the web-based font to use when none of the fonts listed
// above are available on the user's computer. Note that currently
// only the TeX font is available in a web-based form. Set this to
//
// webFont: null,
//
// if you want to prevent the use of web-based fonts.
//
webFont: "TeX",
//
// This is the font to use for image fallback mode (when none of the
// fonts listed above are available and the browser doesn't support
// web-fonts via the @font-face CSS directive). Note that currently
// only the TeX font is available as an image font. Set this to
//
// imageFont: null,
//
// if you want to prevent the use of image fonts (e.g., you have not
// installed the image fonts on your server). In this case, only
// browsers that support web-based fonts will be able to view your pages
// without having the fonts installed on the client computer. The browsers
// that support web-based fonts include: IE6 and later, Chrome, Safari3.1
// and above, Firefox3.5 and later, and Opera10 and later. Note that
// Firefox3.0 is NOT on this list, so without image fonts, FF3.0 users
// will be required to to download and install either the STIX fonts or the
// MathJax TeX fonts.
//
imageFont: "TeX",
//
// This is the font-family CSS value used for characters that are not
// in the selected font (e.g., for web-based fonts, this is where to
// look for characters not included in the MathJax_* fonts). IE will
// stop looking after the first font that exists on the system (even
// if it doesn't contain the needed character), so order these carefully.
//
undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
//
// This setting controls whether <mtext> elements will be typeset
// using the math fonts or the font of the surrounding text. When
// false, the mathvariant="normal" font will be used; when true,
// the font will be inherited from the surrounding paragraph.
//
mtextFontInherit: false,
//
// These values control how "chunky" the display of mathematical
// expressions will be.
//
// EqnChunk is the number of equations that will be typeset before
// they appear on screen. Larger values make for less visual flicker
// as the equations are drawn, but also mean longer delays before the
// reader sees anything.
//
// EqChunkFactor is the factor by which the EqnChunk will grow after each
// chunk is displayed.
//
// EqChunkDelay is the time (in milliseconds) to delay between chunks
// (to allow the browser to respond to other user interaction).
//
// Set EqnChunk to 1, EqnChunkFactor to 1, and EqnChunkDelay to 10 to get
// the behavior from MathJax v1.1 and below.
//
EqnChunk: 50,
EqnChunkFactor: 1.5,
EqnChunkDelay: 100,
//
// This option indicates whether MathJax should try to correct the
// x-height of equations to match the size of the surrounding text.
//
matchFontHeight: true,
//
// When true, MathJax will not measure the widths or heights of the
// subexpressions as it creates its output, but instead will rely on
// its internal calculations based on the bounding boxes of the
// characters it uses, and will only take measurements when it
// absolutely has to. Since measurements cause display reflows, they
// slows down MathJax considerably, so without them MathJax runs
// faster, but can produce slightly less accurate character placements,
// especially in width fractions or roots.
//
noReflows: true,
//
// These settings control automatic line breaking. It is off by
// default, so only explicit line breaks are performed (via
// linebreak="newline" attributes on <mo> and <mspace> elements). To
// perform automatic line breaking on line expressions, set
// 'automatic' to 'true' below. The line breaks will be applied via a
// penalty-based heuristic, which does well, but isn't perfect. You
// might need to use linebreak="goodbreak" or linebreak="badbreak" by
// hand in order to get better effects. It is also possible to modify
// the penalty values; contact the MathJax user's forum for details.
//
linebreaks: {
//
// This controls the automatic breaking of expressions:
// when false, only process linebreak="newline",
// when true, line breaks are inserted automatically in long expressions.
//
automatic: false,
//
// This controls how wide the lines of mathematics can be
//
// Use an explicit width like "30em" for a fixed width.
// Use "container" to compute the size from the containing element.
// Use "nn% container" for a portion of the container.
// Use "nn%" for a portion of the window size.
//
// The container-based widths may be slower, and may not produce the
// expected results if the layout width changes due to the removal
// of previews or inclusion of mathematics during typesetting.
//
width: "container"
},
//
// This allows you to define or modify the styles used to display
// various math elements created by MathJax.
//
// Example:
// styles: {
// ".MathJax .merror": {
// color: "#CC0000",
// border: "1px solid #CC0000"
// }
// }
//
styles: {},
//
// Configuration for <maction> tooltips
// (see also the #MathJax_Tooltip CSS in MathJax/jax/output/HTML-CSS/config.js,
// which can be overridden using the styles values above).
//
tooltip: {
delayPost: 600, // milliseconds delay before tooltip is posted after mouseover
delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout
offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position
}
},
//============================================================================
//
// These parameters control the NativeMML output jax.
//
NativeMML: {
//
// This controls the global scaling of mathematics as compared to the
// surrounding text. Values between 100 and 133 are usually good choices.
//
scale: 100,
//
// Don't allow the matching of math text to surrounding text to use a scaling
// factor smaller than this.
//
minScaleAdjust: 50,
// This option indicates whether MathJax should try to correct the
// x-height of equations to match the size of the surrounding text.
matchFontHeight: true,
//
// This allows you to define or modify the styles used to display
// various math elements created by MathJax.
//
// Example:
// styles: {
// ".MathJax_MathML": {
// color: "red" // MathML is in red
// }
// }
//
styles: {}
},
//============================================================================
//
// These parameters control the SVG output jax.
//
"SVG": {
//
// This controls the global scaling of mathematics as compared to the
// surrounding text. Values between 100 and 133 are usually good choices.
//
scale: 100,
//
// Don't allow the matching of math text to surrounding text to use a scaling
// factor smaller than this.
//
minScaleAdjust: 50,
//
// This specifies the font to use for SVG output (currently the only
// one available)
//
font: "TeX",
//
// This is the stroke width to use for all character paths (1em = 1000
// units). This is a cheap way of getting slightly lighter or darker
// characters
//
blacker: 10,
//
// This is the font-family CSS value used for characters that are not
// in the selected font. IE will stop looking after the first font
// that exists on the system (even if it doesn't contain the needed
// character), so order these carefully.
//
undefinedFamily: "STIXGeneral,'Arial Unicode MS',serif",
//
// This setting controls whether <mtext> elements will be typeset
// using the math fonts or the font of the surrounding text. When
// false, the mathvariant="normal" font will be used; when true,
// the font will be inherited from the surrounding paragraph.
//
mtextFontInherit: false,
//
// This controls whether the MathML structure is retained and CSS
// classes are added to mark the original MathML elements (as in the
// HTML-CSS output). By default, the SVG output jax removes unneeded
// nesting in order to produce a more efficient markup, but if you
// want to use CSS to style the elements as if they were MathML, you
// might need to set this to true.
//
addMMLclasses: false,
//
// These values control how "chunky" the display of mathematical
// expressions will be.
//
// EqnChunk is the number of equations that will be typeset before
// they appear on screen. Larger values make for less visual flicker
// as the equations are drawn, but also mean longer delays before the
// reader sees anything.
//
// EqChunkFactor is the factor by which the EqnChunk will grow after each
// chunk is displayed.
//
// EqChunkDelay is the time (in milliseconds) to delay between chunks
// (to allow the browser to respond to other user interaction).
//
// Set EqnChunk to 1, EqnChunkFactor to 1, and EwnChunkDelay to 10 to get
// the behavior from MathJax v1.1 and below.
//
EqnChunk: 50,
EqnChunkFactor: 1.5,
EqnChunkDelay: 100,
// This option indicates whether MathJax should try to correct the
// x-height of equations to match the size of the surrounding text.
matchFontHeight: true,
//
// These settings control automatic line breaking. It is off by
// default, so only explicit line breaks are performed (via
// linebreak="newline" attributes on <mo> and <mspace> elements). To
// perform automatic line breaking on line expressions, set
// 'automatic' to 'true' below. The line breaks will be applied via a
// penalty-based heuristic, which does well, but isn't perfect. You
// might need to use linebreak="goodbreak" or linebreak="badbreak" by
// hand in order to get better effects. It is also possible to modify
// the penalty values; contact the MathJax user's forum for details.
//
linebreaks: {
//
// This controls the automatic breaking of expressions:
// when false, only process linebreak="newline",
// when true, line breaks are inserted automatically in long expressions.
//
automatic: false,
//
// This controls how wide the lines of mathematics can be
//
// Use an explicit width like "30em" for a fixed width.
// Use "container" to compute the size from the containing element.
// Use "nn% container" for a portion of the container.
// Use "nn%" for a portion of the window size.
//
// The container-based widths may be slower, and may not produce the
// expected results if the layout width changes due to the removal
// of previews or inclusion of mathematics during typesetting.
//
width: "container"
},
//
// These are the styles used for merror elements in SVG output. Note
// that only a limited number of style attributes are supported by
// SVG, but you can at least change the colors and borders.
//
//
merrorStyle: {
fontSize:"90%", color:"#C00", background:"#FF8",
border: "1px solid #C00", padding:"3px"
},
//
// This allows you to define or modify the styles used to display
// various math elements created by MathJax.
//
// Example:
// styles: {
// ".MathJax .merror": {
// color: "#CC0000",
// border: "1px solid #CC0000"
// }
// }
//
styles: {},
//
// Configuration for <maction> tooltips
// (see also the #MathJax_Tooltip CSS in MathJax/jax/output/SVG/config.js,
// which can be overridden using the styles values above).
//
tooltip: {
delayPost: 600, // milliseconds delay before tooltip is posted after mouseover
delayClear: 600, // milliseconds delay before tooltip is cleared after mouseout
offsetX: 10, offsetY: 5 // pixels to offset tooltip from mouse position
}
},
//============================================================================
//
// These parameters control the contextual menus that are available on the
// mathematics within the page (provided the showMathMenu value is true above).
//
MathMenu: {
//
// This is the hover delay for the display of submenus in the
// contextual menu. When the mouse is still over a submenu label for
// this long, the menu will appear. (The menu also will appear if you
// click on the label.) It is in milliseconds.
//
delay: 150,
//
// This is the URL for the MathJax Help menu item.
//
helpURL: "http://www.mathjax.org/help-v2/user/",
//
// These control whether the "Math Renderer", "MathPlayer", "Font
// Preferences", "Contextual Menu", and "Discoverable" menu items will
// be displayed or not.
//
showRenderer: true,
showMathPlayer: true,
showFontMenu: false,
showContext: false,
showDiscoverable: false,
//
// These are the settings for the Annotation menu. If the <math> root has
// a <semantics> child that contains one of the following annotation
// formats, the source will be available via the "Show Math As" menu.
// Each format has a list of possible encodings.
//
semanticsAnnotations: {
"TeX": ["TeX", "LaTeX", "application/x-tex"],
"StarMath": ["StarMath 5.0"],
"Maple": ["Maple"],
"ContentMathML": ["MathML-Content", "application/mathml-content+xml"],
"OpenMath": ["OpenMath"]
},
//
// These are the settings for the Show Source window. The initial
// width and height will be reset after the source is shown in an
// attempt to make the window fit the output better.
//
windowSettings: {
status: "no", toolbar: "no", locationbar: "no", menubar: "no",
directories: "no", personalbar: "no", resizable: "yes", scrollbars: "yes",
width: 100, height: 50
},
//
// This allows you to change the CSS that controls the menu
// appearance. See the extensions/MathMenu.js file for details
// of the default settings.
//
styles: {}
},
//============================================================================
//
// These parameters control the contextual menus that are available on the
// mathematics within the page (provided the showMathMenu value is true above).
//
MathEvents: {
//
// This is the time required for the mouse to be held still over a
// typeset equation in order for it to count as a hover (used when the
// zoom trigger is "Hover"). It is in milliseconds.
//
hover: 500
},
//============================================================================
//
// These parameters control the MMLorHTML configuration file.
// NOTE: if you add MMLorHTML.js to the config array above,
// you must REMOVE the output jax from the jax array.
//
MMLorHTML: {
//
// The output jax that is to be preferred when both are possible
// (set to "MML" for native MathML, "HTML" for MathJax's HTML-CSS output jax).
//
prefer: {
MSIE: "MML",
Firefox: "HTML",
Opera: "HTML",
Safari: "HTML",
Chrome: "HTML",
other: "HTML"
}
}
});
MathJax.Ajax.loadComplete("[MathJax]/config/default.js");

View file

@ -0,0 +1,40 @@
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/config/local/local.js
*
* Include changes and configuration local to your installation
* in this file. For example, common macros can be defined here
* (see below). To use this file, add "local/local.js" to the
* config array in MathJax.js or your MathJax.Hub.Config() call.
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var TEX = MathJax.InputJax.TeX;
// place macros here. E.g.:
// TEX.Macro("R","{\\bf R}");
// TEX.Macro("op","\\mathop{\\rm #1}",1); // a macro with 1 parameter
});
MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js");

View file

@ -0,0 +1,19 @@
/*
* /MathJax/extensions/AssistiveMML.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(a,e,b,f){var c=b.config.menuSettings;var d=MathJax.Extension.AssistiveMML={version:"2.7.5",config:b.CombineConfig("AssistiveMML",{disabled:false,styles:{".MJX_Assistive_MathML":{position:"absolute!important",top:0,left:0,clip:(b.Browser.isMSIE&&(document.documentMode||0)<8?"rect(1px 1px 1px 1px)":"rect(1px, 1px, 1px, 1px)"),padding:"1px 0 0 0!important",border:"0!important",height:"1px!important",width:"1px!important",overflow:"hidden!important",display:"block!important","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},".MJX_Assistive_MathML.MJX_Assistive_MathML_Block":{width:"100%!important"}}}),Config:function(){if(!this.config.disabled&&c.assistiveMML==null){b.Config({menuSettings:{assistiveMML:true}})}a.Styles(this.config.styles);b.Register.MessageHook("End Math",function(g){if(c.assistiveMML){return d.AddAssistiveMathML(g[1])}})},AddAssistiveMathML:function(g){var h={jax:b.getAllJax(g),i:0,callback:MathJax.Callback({})};this.HandleMML(h);return h.callback},RemoveAssistiveMathML:function(k){var h=b.getAllJax(k),l;for(var j=0,g=h.length;j<g;j++){l=document.getElementById(h[j].inputID+"-Frame");if(l&&l.getAttribute("data-mathml")){l.removeAttribute("data-mathml");if(l.lastChild&&l.lastChild.className.match(/MJX_Assistive_MathML/)){l.removeChild(l.lastChild)}}}},HandleMML:function(l){var g=l.jax.length,h,i,n,j;while(l.i<g){h=l.jax[l.i];n=document.getElementById(h.inputID+"-Frame");if(h.outputJax!=="NativeMML"&&h.outputJax!=="PlainSource"&&n&&!n.getAttribute("data-mathml")){try{i=h.root.toMathML("").replace(/\n */g,"").replace(/<!--.*?-->/g,"")}catch(k){if(!k.restart){throw k}return MathJax.Callback.After(["HandleMML",this,l],k.restart)}n.setAttribute("data-mathml",i);j=f.addElement(n,"span",{isMathJax:true,unselectable:"on",className:"MJX_Assistive_MathML"+(h.root.Get("display")==="block"?" MJX_Assistive_MathML_Block":"")});try{j.innerHTML=i}catch(k){}n.style.position="relative";n.setAttribute("role","presentation");n.firstChild.setAttribute("aria-hidden","true");j.setAttribute("role","presentation")}l.i++}l.callback()}};b.Startup.signal.Post("AssistiveMML Ready")})(MathJax.Ajax,MathJax.Callback,MathJax.Hub,MathJax.HTML);MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/toMathML.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/AssistiveMML.js"],function(){MathJax.Hub.Register.StartupHook("End Config",["Config",MathJax.Extension.AssistiveMML])});

View file

@ -0,0 +1,19 @@
/*
* /MathJax/extensions/CHTML-preview.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/fast-preview.js"],["loadComplete",MathJax.Ajax,"[MathJax]/extensions/CHTML-preview.js"]);

View file

@ -0,0 +1,19 @@
/*
* /MathJax/extensions/FontWarnings.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(b,d){var i="2.7.5";var a="http://www.stixfonts.org/";var f="https://github.com/mathjax/MathJax/tree/master/fonts/HTML-CSS/TeX/otf";var h=b.CombineConfig("FontWarnings",{messageStyle:{position:"fixed",bottom:"4em",left:"3em",width:"40em",border:"3px solid #880000","background-color":"#E0E0E0",color:"black",padding:"1em","font-size":"small","white-space":"normal","border-radius":".75em","-webkit-border-radius":".75em","-moz-border-radius":".75em","-khtml-border-radius":".75em","box-shadow":"4px 4px 10px #AAAAAA","-webkit-box-shadow":"4px 4px 10px #AAAAAA","-moz-box-shadow":"4px 4px 10px #AAAAAA","-khtml-box-shadow":"4px 4px 10px #AAAAAA",filter:"progid:DXImageTransform.Microsoft.dropshadow(OffX=3, OffY=3, Color='gray', Positive='true')"},Message:{webFont:[["closeBox"],["webFont","MathJax is using web-based fonts to display the mathematics on this page. These take time to download, so the page would render faster if you installed math fonts directly in your system's font folder."],["fonts"]],imageFonts:[["closeBox"],["imageFonts","MathJax is using its image fonts rather than local or web-based fonts. This will render slower than usual, and the mathematics may not print at the full resolution of your printer."],["fonts"],["webFonts"]],noFonts:[["closeBox"],["noFonts","MathJax is unable to locate a font to use to display its mathematics, and image fonts are not available, so it is falling back on generic unicode characters in hopes that your browser will be able to display them. Some characters may not show up properly, or possibly not at all."],["fonts"],["webFonts"]]},HTML:{closeBox:[["div",{style:{position:"absolute",overflow:"hidden",top:".1em",right:".1em",border:"1px outset",width:"1em",height:"1em","text-align":"center",cursor:"pointer","background-color":"#EEEEEE",color:"#606060","border-radius":".5em","-webkit-border-radius":".5em","-moz-border-radius":".5em","-khtml-border-radius":".5em"},onclick:function(){if(c.div&&c.fade===0){if(c.timer){clearTimeout(c.timer)}c.div.style.display="none"}}},[["span",{style:{position:"relative",bottom:".2em"}},["x"]]]]],webFonts:[["p"],["webFonts","Most modern browsers allow for fonts to be downloaded over the web. Updating to a more recent version of your browser (or changing browsers) could improve the quality of the mathematics on this page."]],fonts:[["p"],["fonts","MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2). Download and install one of those fonts to improve your MathJax experience.",a,f]],STIXfonts:[["p"],["STIXPage","This page is designed to use the [STIX fonts](%1). Download and install those fonts to improve your MathJax experience.",a]],TeXfonts:[["p"],["TeXPage","This page is designed to use the [MathJax TeX fonts](%1). Download and install those fonts to improve your MathJax experience.",f]]},removeAfter:12*1000,fadeoutSteps:10,fadeoutTime:1.5*1000});if(MathJax.Hub.Browser.isIE9&&document.documentMode>=9){delete h.messageStyle.filter}var c={div:null,fade:0};var e=function(m){if(c.div){return}var j=MathJax.OutputJax["HTML-CSS"],n=document.body;if(b.Browser.isMSIE){if(h.messageStyle.position==="fixed"){MathJax.Message.Init();n=document.getElementById("MathJax_MSIE_Frame")||n;if(n!==document.body){h.messageStyle.position="absolute"}}}else{delete h.messageStyle.filter}h.messageStyle.maxWidth=(document.body.clientWidth-75)+"px";var k=0;while(k<m.length){if(MathJax.Object.isArray(m[k])){if(m[k].length===1&&h.HTML[m[k][0]]){m.splice.apply(m,[k,1].concat(h.HTML[m[k][0]]))}else{if(typeof m[k][1]==="string"){var l=MathJax.Localization.lookupPhrase(["FontWarnings",m[k][0]],m[k][1]);l=MathJax.Localization.processMarkdown(l,m[k].slice(2),"FontWarnings");m.splice.apply(m,[k,1].concat(l));k+=l.length}else{k++}}}else{k++}}c.div=j.addElement(n,"div",{id:"MathJax_FontWarning",style:h.messageStyle},m);MathJax.Localization.setCSS(c.div);if(h.removeAfter){b.Register.StartupHook("End",function(){c.timer=setTimeout(g,h.removeAfter)})}d.Cookie.Set("fontWarn",{warned:true})};var g=function(){c.fade++;if(c.timer){delete c.timer}if(c.fade<h.fadeoutSteps){var j=1-c.fade/h.fadeoutSteps;c.div.style.opacity=j;c.div.style.filter="alpha(opacity="+Math.floor(100*j)+")";setTimeout(g,h.fadeoutTime/h.fadeoutSteps)}else{c.div.style.display="none"}};if(!d.Cookie.Get("fontWarn").warned){b.Startup.signal.Interest(function(m){if(m.match(/HTML-CSS Jax - /)&&!c.div){var j=MathJax.OutputJax["HTML-CSS"],n=j.config.availableFonts,l;var k=(n&&n.length);if(!k){h.HTML.fonts=[""]}else{if(n.length===1){h.HTML.fonts=h.HTML[n[0]+"fonts"]}}if(j.allowWebFonts){h.HTML.webfonts=[""]}if(m.match(/- Web-Font/)){if(k){l="webFont"}}else{if(m.match(/- using image fonts/)){l="imageFonts"}else{if(m.match(/- no valid font/)){l="noFonts"}}}if(l&&h.Message[l]){MathJax.Localization.loadDomain("FontWarnings",[e,h.Message[l]])}}})}})(MathJax.Hub,MathJax.HTML);MathJax.Ajax.loadComplete("[MathJax]/extensions/FontWarnings.js");

View file

@ -0,0 +1,19 @@
/*
* /MathJax/extensions/HTML-CSS/handle-floats.js
*
* Copyright (c) 2009-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
MathJax.Extension["HTML-CSS/handle-floats"]={version:"2.7.5"};MathJax.Hub.Startup.signal.Post("HTML-CSS handle-floats Ready");MathJax.Ajax.loadComplete("[MathJax]/extensions/HTML-CSS/handle-floats.js");

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more