123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head><title>{{.title}}</title></head>
- <body>
- <ol>
- <li id="disclosure">
- <b>Responsible Disclosure:</b> In case you are reluctant to <a
- href="http://purl.mro.name/ShaarliGo/issues">file a public issue</a>, feel free to
- email <a href="mailto:security@mro.name?subject=ShaarliGo">security@mro.name</a>.
- </li>
- <li id="update">
- <b>Update:</b> Just replace the file <code>shaarligo.cgi</code>. To update the assets, delete them and
- <code>app/delete_me_to_restore</code>, then clear your browser cache and visit the CGI, e.g.
- the <a href="../search/?q=foo">search</a>.
- <br class="br"/>
- <br class="br"/>
- <code>$ curl -LRo shaarligo.cgi http://purl.mro.name/Linux-x86_64/shaarligo.cgi<br class="br"/>
- # copy to your webspace<br class="br"/>
- $ chmod 555 shaarligo.cgi<br class="br"/>
- $ rm -rf app/delete_me_to_restore themes/current .htaccess app/.htaccess app/lighttpd.conf</code>
- </li>
- <li id="config"><a href="../config/">Config</a></li>
- <li>
- <form class="form-inline" name="tag_rename">
- <div class="form-group">
- <label for="tag_rename_old">Rename Tag:</label>
- <input type="text" class="form-control" id="tag_rename_old" placeholder="#before" value="{{ .tag_rename_old }}"/>
- </div>
- <div class="form-group">
- <label for="tag_rename_new" class="sr-only">To:</label>
- <input type="text" class="form-control" id="tag_rename_new" placeholder="#after" value="{{ .tag_rename_new }}"/>
- </div>
- <button type="submit" class="btn btn-primary">Rename</button>
- </form>
- </li>
- <li>
- <form class="form-inline" name="shaarli_import" method="post">
- <div class="form-group">
- <label for="shaarli_import_url">Import Other Shaarli:</label>
- <input type="url" class="form-control" name="shaarli_import_url" placeholder="https://demo.shaarli.org/?" value="{{ .other_shaarli_url }}"/>
- </div>
- <div class="form-group">
- <label for="shaarli_import_tag" class="sr-only">#MarkerForThisImport</label>
- <input type="text" class="form-control" name="shaarli_import_tag" placeholder="#MarkerTagForThisImport" value="#{{ .other_shaarli_tag }}"/>
- </div>
- <button name="shaarli_import_submit" type="submit" value="shaarli_import_submit" class="btn btn-primary">Import</button>
- </form>
- </li>
- <li id="bookmarklet">
- <b>Bookmarklet:</b> <a
- onclick="alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...');return false;"
- href="javascript:javascript:(function(s){
- const bas=new URL(s);
- const agn='bookmarklet';
- const url=location.href;
- /* scrape */
- /* precedence like https://codeberg.org/mro/ShaarliGo/src/branch/master/comb.go#L54 */
- const tit=document.title
- ??document.querySelector('meta[name=\'title\']')?.content
- ??document.querySelector('meta[property=\'og:title\']')?.content;
- const tgs=document.querySelector('meta[name=\'keywords\']')?.content
- ??document.querySelector('meta[name=\'news_keywords\']')?.content??'';
- const con=document.getSelection()?.toString()
- ||document.querySelector('meta[name=\'description\']')?.content||'';
- const img=document.querySelector('meta[property=\'og:image\']')?.content;
- /* seed the popup */
- const ps=bas.searchParams;
- function put(k,v){ps.append(k,v);}
- put('post',url);
- put('source',agn);
- put('scrape','no');
- put('title',tit);
- put('tags',tgs);
- put('image',img);
- put('description',con);
- /* popup */
- console.info(bas);
- const po=window.open(bas.href,'_blank','menubar=no,height=450,width=600,toolbar=no,scrollbars=no,status=no,dialog=1');
- function fun(event){
- put('token',event.data);
- po.postMessage(ps,'*');
- window.removeEventListener(event.type,fun);
- }
- window.addEventListener('message',fun);
- })('{{.xml_base}}');">✚ShaarliGo 🌺</a>
- <span>⇐ Drag this link to your bookmarks toolbar (or right-click it and choose Bookmark This Link…).
- Then click "✚ShaarliGo 🌺" button in any page you want to share.</span>
- </li>
- <li id="version">
- <b>Version:</b> <a href="http://purl.mro.name/ShaarliGo/v{{.version}}+{{.gitsha1}}"><span id="number">v{{.version}}</span>+<span id="gitsha1">{{.gitsha1}}</span></a>
- </li>
- </ol>
- </body>
- </html>
|