Skip to content

Instantly share code, notes, and snippets.

@Pitmairen
Pitmairen / Tweak icons.css
Created May 8, 2019 19:56
Tweak icons size selection search
.popup a{
padding: 0.4em;
}
.popup img{
transform: scale(1.5);
}
@Pitmairen
Pitmairen / gist:bf71aaf5f8d41b6b9f45238a2cb09d97
Created May 8, 2019 19:43
Workaround for special search engines
Making the "chrome://history/#search/%s" search engine work in selections earch.
A workaround to make this search engine work in selections earch is to enable some options to open the
search in a new background tab. This will open the search through the background page which prevents
the search from being blocked.
A few different ways to do it, depending on what options you are using:
1. In the other options section, if both "Open search in new tab" and "Open search in background tab" is enabled:
The search should work with this configuration, but it will affect all search engine and make them open
You can already do mostly what you want using a little bit of custom CSS.
On the options page -> Popup Menu -> Advanced Settings -> Customize.
Append the following to the end of the text area:
/* This will center the popup above the selection: */
.popup.mainmenu{
transform: translate(-50%, calc(-100% - 15px));
}
@Pitmairen
Pitmairen / search-current-site.js
Last active December 6, 2017 21:17
Userscript for current site search with selection search chrome extension. Tested with Violenmonkey.
// ==UserScript==
// @name Search with the first input found on current site
// @namespace https://github.com/Pitmairen/selection-search
// @version 0.1
// @description Use search url: #_selectionsearch_=%s With icon url: CURRENT_DOMAIN
// @author Pitmairen
// @license GPL-3.0
// @match *://*/*
// @homepageURL https://chrome.google.com/webstore/detail/selection-search/gipnlpdeieaidmmeaichnddnmjmcakoe
// @supportURL https://github.com/Pitmairen/selection-search/issues
@Pitmairen
Pitmairen / mult-row-icons-only.css
Last active October 31, 2017 20:49
Selection search rows and columns
.popup .engine-name, .popup.mainmenu > li:first-child{
display: none;
}
.popup a, .popup li{
display: inline-block; padding: 0.2em;
}
.popup img{
margin: 0; padding: 0;
}
.popup {
@Pitmairen
Pitmairen / gist:1315752
Created October 26, 2011 08:04
Flask template loader
import os.path
from jinja2 import FileSystemLoader, BaseLoader
from flask import session
class VersionedTemplatesLoader(BaseLoader):
def __init__(self, app):