Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name HTMLEditor
// @namespace http://yoksel.ru/
// @description HTMLEditor
// @include *
// @require https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_listValues
// @grant GM_addStyle
@yoksel
yoksel / gist:8d7fe2f97e4ddf46a8f0
Created March 19, 2016 14:42
EntryPage::print_comment()
function EntryPage::print_comment (Comment c) {
var Page p = get_page();
var string comment_class = "j-c";
var string c_id = "id=\"$c.dom_id\"";
if ($c.full) {
$comment_class = $comment_class + " j-c-full";
} else {
// ==UserScript==
// @name Test makets
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author yoksel
// @match http://localhost:3001/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@yoksel
yoksel / telegram_channel.md
Created April 1, 2016 09:17 — forked from gladkih/telegram_channel.md
Список каналов в telegram на которые подписан.

https://telegram.me/zavtracast Официальный канал Завтракаста - подкаста об играх, медиа, технологиях

https://telegram.me/webstandards_ru Ежедневные новости фронтенда от «Веб-стандартов»

https://telegram.me/addmeto филиал addmeto.сс на земле

https://telegram.me/techsparks Аннотированные ссылки на интересные, полезные и удивительные новости хайтека (ведет @asebrant)

https://telegram.me/bestarticles Ссылки на интересные статьи на русском одним сообщением в день. Сайт проекта: bestarticles.co

@yoksel
yoksel / maket-checker.css
Last active April 6, 2016 15:21
Maket checker
BODY:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
min-height: 4000px;
@yoksel
yoksel / script.js
Created April 6, 2016 15:20
Userscript for pixel perfect testing
// ==UserScript==
// @name Test makets
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author yoksel
// @match http://localhost:3001/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@yoksel
yoksel / .stylelintrc
Last active February 24, 2020 23:04
Конфиг для CSS-линтера
{
"rules": {
"at-rule-empty-line-before": [
"always",
{
except: ["blockless-group", "first-nested"],
message: "Ожидается пустая строка перед @-правилом"
}
],
"at-rule-semicolon-newline-after": [
BODY > * {
outline: 2px solid hotpink;
}
BODY > * > * {
outline: 2px dashed yellowgreen;
outline-offset: -2px;
}
BODY > * > * > * {
outline: 2px dotted steelblue;
outline-offset: -4px;
module.exports = function(bh) {
bh.match('list', function (ctx) {
ctx.tag('ul');
ctx.content(
ctx.ctx.items.map(function (item) {
const items = ctx.ctx.items;
const block = ctx.ctx.mix.block;
let content = item.content;
@yoksel
yoksel / show-icons.js
Last active September 19, 2018 12:21
Bookmarklet for showing SVG icons existing on page
javascript:void(function(){ var doc = document; var body = doc.querySelector("body"); var head = doc.querySelector("head"); var icons = ""; var resultElem = doc.querySelector("#icons-shower"); if ( !resultElem ) { var styleElem = doc.createElement("style"); styleElem.setAttribute("id", "icons-styles"); styleElem.innerHTML += "UL {padding: 0;} LI {list-style: none;}"; styleElem.innerHTML += "#icons-shower {position: absolute; z-index: 5010; top: 0; right: 0; width: 500px; padding: 30px; background: white; border: 1px solid #DDD; box-shadow: 0 0 5px rgba(0,0,0,.5)}"; styleElem.innerHTML += ".icons-list__item {padding: 1em 0; border-bottom: 1px solid #DDD;}"; styleElem.innerHTML += ".icons-list__title {display: inline-block; margin: 0;}"; styleElem.innerHTML += ".svg-icon { float: right; width: 2em; height: 2em;}"; styleElem.innerHTML += ".icons-shower__title {margin-bottom: 1.5em}"; styleElem.innerHTML += ".icons-shower__close {float: right; cursor: pointer; font-size: 3em; line-height: 1;}"; head.appendChild(