mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Allow running shell scripts from the FileManager/Favorites (#5804)
* Allow running Shell/Python scripts from the FM * Show an InfoMessage before/after running the script Since we're blocking the UI ;). * Allow running scripts from the favorites menu, too.
This commit is contained in:
@@ -882,6 +882,9 @@ function CreDocument:register(registry)
|
||||
registry:addProvider("rtf", "application/rtf", self, 90)
|
||||
registry:addProvider("xhtml", "application/xhtml+xml", self, 90)
|
||||
registry:addProvider("zip", "application/zip", self, 10)
|
||||
-- Scripts that we allow running in the FM (c.f., util.isAllowedScript)
|
||||
registry:addProvider("sh", "application/x-shellscript", self, 90)
|
||||
registry:addProvider("py", "text/x-python", self, 90)
|
||||
end
|
||||
|
||||
-- Optimise usage of some of the above methods by caching their results,
|
||||
|
||||
Reference in New Issue
Block a user