@@ -104,7 +104,7 @@ class GetUser(Endpoint):
@endpoint("/u/<string:user>/config")
-class UserConfig(Endpoint):
+class GetUserConfig(Endpoint):
def html(self, user: str):
u = self.require_authentication(user)
return render(
@@ -46,6 +46,12 @@ class Config(View):
username: str
admin_pane: Optional[AdminPane]
+ def bookmarklet_link(self):
+ return ('javascript:(function(){window.open(`' +
+ c.app_path + '/u/' + self.username +
+ '/l?name=${document.title}&url=${document.URL}`);})();')
+
@dataclass
class Tag(View):
@@ -20,6 +20,12 @@
</form>
</div>
+<div class="config-pane">
+ <div class="config">
+ <p>Drag the following link to your bookmark bar to create a bookmarklet:</p>
+ <p><a href="{{bookmarklet_link}}">Add Lament</a></p>
+ </div>
+</div>
{{#admin_pane}}
<div class="config-pane">
<div class="config">