This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin background-image-retina($file, $type, $width, $height) { | |
background-image: url($file + '.' + $type); | |
@media (-webkit-min-device-pixel-ratio: 2) { | |
& { | |
background-image: url($file + '@2x.' + $type); | |
-webkit-background-size: $width $height; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Setup images sprite having high resolution variant for retina displays. | |
* | |
* It will create class names for all available icons. | |
* | |
* This uses custom function to prefix selectors from array. To get it working you will need to include following snippet in your config.rb | |
* | |
* module Sass::Script::Functions | |
* def prefix_each(array, prefix) | |
* return Sass::Script::String.new array.to_a.map{|item| prefix.value + item.value}.join(", ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var searchEngines = [ | |
{ url: 'https://duckduckgo.com/?q=', param: 'q' }, | |
{ url: 'https://www.google.de/search?q=', param: 'q' }, | |
{ url: 'https://www.bing.com/search?q=', param: 'q' }, | |
{ url: 'https://search.yahoo.com/search?p=', param: 'p' }, | |
{ url: 'https://www.ecosia.org/search?q=', param: 'q' }, | |
{ url: 'https://www.qwant.com/?q=', param: 'q' }, | |
{ url: 'https://www.startpage.com/do/dsearch?query=', param: 'query' }, | |
{ url: 'https://metager.de/meta/meta.ger3?eingabe=', param: 'eingabe' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var tooltipElements = document.querySelectorAll('[data-tooltip-template="web.FieldTooltip"]'); | |
if (!tooltipElements || tooltipElements.length === 0) { | |
alertTooltips('Die Tooltipelemente wurden nicht gefunden.'); | |
return; | |
} | |
var alertsContainer = document.getElementById('alertTooltipsContainer'); | |
if (!alertsContainer || alertsContainer === null) { | |
alertsContainer = document.createElement('div'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var searchEngines = [ | |
{ url: 'https://duckduckgo.com/?q=', param: 'q' }, | |
{ url: 'https://www.google.de/search?q=', param: 'q' }, | |
{ url: 'https://www.bing.com/search?q=', param: 'q' }, | |
{ url: 'https://search.yahoo.com/search?p=', param: 'p' }, | |
{ url: 'https://www.ecosia.org/search?q=', param: 'q' }, | |
{ url: 'https://www.qwant.com/?q=', param: 'q' }, | |
{ url: 'https://www.startpage.com/do/dsearch?query=', param: 'query' }, | |
{ url: 'https://metager.de/meta/meta.ger3?eingabe=', param: 'eingabe' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Vue.js Financial Calculator</title> | |
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script> | |
</head> | |
<style> | |
::root { | |
--highlight-font-size: 1.2em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeNonTransparentAreasWhite(imageElement) { | |
const canvas = document.createElement('canvas'); | |
const ctx = canvas.getContext('2d'); | |
canvas.width = imageElement.width; | |
canvas.height = imageElement.height; | |
ctx.drawImage(imageElement, 0, 0); | |
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); | |
const data = imageData.data; |