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
javascript: function findNodes(el) { | |
return el.querySelectorAll('.score'); | |
} | |
function isDigit(str) { | |
return str.length === 1 && str.match(/[0-9]/i); | |
} | |
function metricVal(el) { | |
let modifiers = { |
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
// Paste this into JS to find an ACE editor in your browser window | |
// Based off of https://stackoverflow.com/questions/12102425/recursively-search-for-a-value-in-global-variables-and-its-properties/12103127#12103127 | |
function isTarget(obj) { | |
// return typeof obj == typeof value && obj == value | |
return obj && obj['getSelectedText']; | |
} | |
function globalSearch(startObject, isTargetFunc) { | |
var stack = [[startObject, '']]; | |
var searched = []; | |
var found = false; |
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
// Paste this into JS to find an ACE editor in your browser window | |
// Based off of https://stackoverflow.com/questions/12102425/recursively-search-for-a-value-in-global-variables-and-its-properties/12103127#12103127 | |
function isTarget(obj) { | |
// return typeof obj == typeof value && obj == value | |
if (obj && obj['getModel'] && obj.getModel() && obj.getModel().getValueInRange) { | |
const highlight = obj.getModel().getValueInRange(obj.getSelection()) | |
if (highlight) { | |
console.log('highlight', highlight); | |
return true; | |
} |
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
javascript: function findNodes(el) { | |
return el.querySelectorAll('#vote-count-middle'); | |
} | |
function isDigit(str) { | |
return str.length === 1 && str.match(/[0-9]/i); | |
} | |
function metricVal(el) { | |
let modifiers = { |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:ui'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
OlderNewer