Added support for dark theme
This commit is contained in:
parent
86a695ad4f
commit
932f64b8eb
@ -26,6 +26,9 @@ function PastebinEmbed ($m) {
|
|||||||
$raw = in_array('raw', $args);
|
$raw = in_array('raw', $args);
|
||||||
$noPre = in_array('no-pre', $args);
|
$noPre = in_array('no-pre', $args);
|
||||||
|
|
||||||
|
## Dark theme, if specified.
|
||||||
|
$theme = $parsed['theme'] ?: "";
|
||||||
|
|
||||||
## Convert the comma-delimited line ranges to an array containing each line to be
|
## Convert the comma-delimited line ranges to an array containing each line to be
|
||||||
## included as values.
|
## included as values.
|
||||||
## Note that the line numbers will be zero-indexed (for use with raw text, etc.).
|
## Note that the line numbers will be zero-indexed (for use with raw text, etc.).
|
||||||
@ -60,8 +63,8 @@ function PastebinEmbed ($m) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$embed_js_url = "https://pastebin.com/embed_js/$paste_id";
|
$embed_js_url = "https://pastebin.com/embed_js/$paste_id" . ($theme ? "?theme={$theme}" : "");
|
||||||
$embed_iframe_url = "https://pastebin.com/embed_iframe/$paste_id";
|
$embed_iframe_url = "https://pastebin.com/embed_iframe/$paste_id" . ($theme ? "?theme={$theme}" : "");
|
||||||
$embed_raw_url = "https://pastebin.com/raw/$paste_id";
|
$embed_raw_url = "https://pastebin.com/raw/$paste_id";
|
||||||
|
|
||||||
$out = "<span class='pastebin-embed-error'>Unknown error.</span>";
|
$out = "<span class='pastebin-embed-error'>Unknown error.</span>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user