Domain: www.msy.com.au
Selector: .container .row .col-md-2[style]
var items = this.context.binding.get('value').items, | |
html = '<table class="table table-sm table-bordered"><thead class="thead-default"><tr><th>Property</th><th>Value</th></tr></thead>'; | |
html += items.map(function (i) { | |
var a; | |
try { | |
a = JSON.parse(i.value); | |
} catch (e) { | |
a = i.value; | |
} |
This was originally a fiddle.
It's a dumb little thing I made after seeing a poster with 'fitted' text. It take a long corpus of text, and fits all that text within a certain width on screen, creating a poster/wall of text where each line perfectly fills the width of the column.
The fiddle [http://jsfiddle.net/Jx39q/1/].
/** | |
* Returns the CoachView instance object for the control ID. To limit the scope of the search, | |
* provide a parent DOM Element or CoachView instance as the second argument. | |
* | |
* Note: Control IDs are not unique per page - this will return only the first CoachView with the | |
* supplied ControlID on the page or under the given parent. | |
* | |
* @param {string} controlId - control ID search target | |
* @param {Element | CoachView} [parent] - limit to CoachViews under this |
console.clear(); | |
var text = []; | |
String.prototype.toTitleCase = function () { | |
return this.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); | |
}; | |
$('.clickableTxnRow').each(function () { | |
var a = $(this); |
var _ = (function () { | |
return { | |
// array | |
filter: array_filter | |
, last: array_last | |
, map: array_map | |
, pop: array_pop | |
, push: array_push | |
, unshift: array_unshift |
var _ = (function () { | |
return { | |
// array | |
filter: array_filter | |
, last: array_last | |
, map: array_map | |
, pop: array_pop | |
, push: array_push | |
, unshift: array_unshift |
$('.vote-positive').each(function (i, el) { | |
var pos = +el.textContent; | |
var neg = +$(el).siblings('.vote-negative').text() | |
var tot = pos + Math.abs(neg); | |
if (tot < 40) { | |
console.log(tot) | |
$(el).closest('li').css('opacity', 0.5) | |
} |
First off, I love the new forums that Arn and the team have put up. Vast improvement. And I'm also thankful that the Spy wasn't a porting afterthought and left for later to be released.
But I still have some suggestions that would make the Spy better. And most, if not all, of the suggestions are implemented in the attached UserScript newspy.user.js attached here.
The mod is made as the MR Spy was at 2015-06-23 0030 (AEST).
I 'built' and tested it on Chrome via the Tampermonkey extension. There's no reason why other UserScript extensions or Firefox won't be able to handle this either.