mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 18:32:25 +01:00
add :pagestyle command to allow for switching between alternate style sheets
This commit is contained in:
1
NEWS
1
NEWS
@@ -10,6 +10,7 @@
|
|||||||
generous donation which made this behavior possible)
|
generous donation which made this behavior possible)
|
||||||
* IMPORTANT: ctrl-x/a never take possible negative URLs into account, it was just
|
* IMPORTANT: ctrl-x/a never take possible negative URLs into account, it was just
|
||||||
too unpredictable
|
too unpredictable
|
||||||
|
* add :pagestyle command to allow for switching between alternate style sheets
|
||||||
* add :b# to select the alternate buffer
|
* add :b# to select the alternate buffer
|
||||||
* add :tabduplicate command
|
* add :tabduplicate command
|
||||||
* new 'urlseparator' option for specifying the regexp used to split the arg to
|
* new 'urlseparator' option for specifying the regexp used to split the arg to
|
||||||
|
|||||||
@@ -452,6 +452,19 @@ liberator.Buffer = function () //{{{
|
|||||||
"Show various page information",
|
"Show various page information",
|
||||||
function () { liberator.buffer.showPageInfo(true); });
|
function () { liberator.buffer.showPageInfo(true); });
|
||||||
|
|
||||||
|
liberator.commands.add(["pagest[yle]"],
|
||||||
|
"Select the author style sheet to apply",
|
||||||
|
function (args)
|
||||||
|
{
|
||||||
|
if (liberator.options["usermode"])
|
||||||
|
liberator.options["usermode"] = false;
|
||||||
|
|
||||||
|
stylesheetSwitchAll(window.content, args);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
completer: function (filter) { return liberator.completion.stylesheet(filter); }
|
||||||
|
});
|
||||||
|
|
||||||
liberator.commands.add(["re[load]"],
|
liberator.commands.add(["re[load]"],
|
||||||
"Reload current page",
|
"Reload current page",
|
||||||
function (args, special) { liberator.tabs.reload(getBrowser().mCurrentTab, special); });
|
function (args, special) { liberator.tabs.reload(getBrowser().mCurrentTab, special); });
|
||||||
|
|||||||
@@ -285,6 +285,12 @@ liberator.Completion = function () //{{{
|
|||||||
return [0, this.filter(engines, filter)];
|
return [0, this.filter(engines, filter)];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
stylesheet: function (filter)
|
||||||
|
{
|
||||||
|
var stylesheets = getAllStyleSheets(window.content).map(function (stylesheet) { return [stylesheet.title, ""]; });
|
||||||
|
return [0, this.filter(stylesheets, filter)];
|
||||||
|
},
|
||||||
|
|
||||||
// TODO: support file:// and \ or / path separators on both platforms
|
// TODO: support file:// and \ or / path separators on both platforms
|
||||||
// TODO: sort directories first
|
// TODO: sort directories first
|
||||||
// if "tail" is true, only return names without any directory components
|
// if "tail" is true, only return names without any directory components
|
||||||
|
|||||||
@@ -61,4 +61,16 @@ When running in X11 the text of the following commands is not only copied to
|
|||||||
the clipboard, but also put into the X11 selection, which can be pasted with
|
the clipboard, but also put into the X11 selection, which can be pasted with
|
||||||
the middle mouse button:
|
the middle mouse button:
|
||||||
|
|
||||||
|
section:Alternate{nbsp}Style{nbsp}Sheets[stylesheet,style]
|
||||||
|
|
||||||
|
|:pagest| |:pagestyle|
|
||||||
|
||:pagest[yle]||
|
||||||
|
________________________________________________________________________________
|
||||||
|
Select the author style sheet to apply. Page authors may specify alternate
|
||||||
|
style sheets for an HTML document. Users can then switch between these
|
||||||
|
various style sheets, selecting their favorite.
|
||||||
|
|
||||||
|
All author styling can be removed by setting the 'usermode' option.
|
||||||
|
________________________________________________________________________________
|
||||||
|
|
||||||
// vim: set syntax=asciidoc:
|
// vim: set syntax=asciidoc:
|
||||||
|
|||||||
Reference in New Issue
Block a user