This file contains hidden or 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
// Transform this source into a bookmarklet on http://bookmarklets.org/maker/ | |
var url = window.location.href; | |
// Redmine Issue -> Git Commit Message | |
if (url.indexOf('redmine') > -1) { | |
var story = window.document.querySelectorAll('#content .subject p')[0].innerText; | |
var task = window.document.querySelectorAll('#content h2')[0].innerText; | |
var detail = window.document.querySelectorAll('#content .subject h3')[0].innerText; | |
var message = url + ' ' + story + ' - ' + task + ': ' + detail; |
This file contains hidden or 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 vunit($input, $width, $height){ | |
@if unit($width) != px or unit($height) != px { | |
@error "function vunit() dimensions should contain a px unit. +[" + $width + ", " + $height +"]"; | |
} | |
// Store $input unit | |
$unit: unit($input); | |
// Remove unit from $input and convert to ratio | |
$ratio: $input / ($input * 0 + 1) / 100; | |
// Calc and store return values |