Creation
This commit is contained in:
commit
aa745b8965
17
README.md
Normal file
17
README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Readability
|
||||||
|
Plugin for [Falkon](https://www.falkon.org/) web browser.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
A basic python plugin for Falkon
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
### Automatic
|
||||||
|
Go to [Falkon store](https://store.falkon.org/) press `Install` and follow the instructions.
|
||||||
|
|
||||||
|
### Manual
|
||||||
|
Copy the `readability` directory into `~/.config/falkon/plugins/`
|
||||||
|
|
||||||
|
With Falkon 3.1 and lower copy the `readability` directory into Falkon global plugin directory.
|
||||||
|
e.g. `/usr/lib/qt/plugins/falkon/python/`
|
||||||
|
|
||||||
|
> It will only work if Python support is enabled and functional.
|
30
readability/__init__.py
Normal file
30
readability/__init__.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import Falkon
|
||||||
|
from PySide2 import QtCore
|
||||||
|
|
||||||
|
|
||||||
|
class Readability(Falkon.PluginInterface, QtCore.QObject):
|
||||||
|
def init(self, state, settingsPath):
|
||||||
|
plugins = Falkon.MainApplication.instance().plugins()
|
||||||
|
|
||||||
|
plugins.mainWindowCreated.connect(self.onMainWindowCreated)
|
||||||
|
plugins.mainWindowDeleted.connect(self.mainWindowDeleted)
|
||||||
|
|
||||||
|
if state == Falkon.PluginInterface.LateInitState:
|
||||||
|
for window in Falkon.MainApplication.instance().windows():
|
||||||
|
self.onMainWindowCreated(window)
|
||||||
|
|
||||||
|
def unload(self):
|
||||||
|
for window in Falkon.MainApplication.instance().windows():
|
||||||
|
self.mainWindowDeleted(window)
|
||||||
|
|
||||||
|
def testPlugin(self):
|
||||||
|
return True
|
||||||
|
|
||||||
|
def onMainWindowCreated(self, window):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def mainWindowDeleted(self, window):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
Falkon.registerPlugin(Readability())
|
11
readability/metadata.desktop
Normal file
11
readability/metadata.desktop
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Readability
|
||||||
|
Comment=A basic python plugin for Falkon
|
||||||
|
|
||||||
|
Type=Service
|
||||||
|
X-Falkon-Type=Extension/Python
|
||||||
|
|
||||||
|
X-Falkon-Author=Example name
|
||||||
|
X-Falkon-Email=python@example.com
|
||||||
|
X-Falkon-Version=1.0.0
|
||||||
|
X-Falkon-Settings=false
|
Loading…
Reference in New Issue
Block a user