SHOW:
|
|
- or go back to the newest paste.
1 | // ==UserScript== | |
2 | // @name THE SELECTOID | |
3 | // @namespace http://use.i.E.your.homepage/ | |
4 | // @version 0.1 | |
5 | // @description Allows highlighting of unhighlightable text | |
6 | - | // @match https://*mturk.com/* |
6 | + | // @match https://*.mturk.com/* |
7 | // @include https://work.scalableworkforce.com/* | |
8 | // @copyright 2012+, tux_mark_5 | |
9 | // @grant GM_setClipboard | |
10 | // ==/UserScript== | |
11 | ||
12 | function withPages_jQuery(NAMED_FunctionToRun) | |
13 | { | |
14 | var funcText = NAMED_FunctionToRun.toString (); | |
15 | var funcName = funcText.replace (/^function\s+(\w+)\s*\((.|\n|\r)+$/, "$1"); | |
16 | var script = document.createElement("script"); | |
17 | script.textContent = funcText + "\n\n"; | |
18 | script.textContent += 'jQuery(document).ready(function() {'+funcName+'(jQuery);});'; | |
19 | document.body.appendChild(script); | |
20 | }; | |
21 | ||
22 | function main0($) | |
23 | { | |
24 | function create_href(self) | |
25 | { | |
26 | /*div = document.createElement("div"); | |
27 | div.innerHTML = "Copy" | |
28 | div.text0 = self.innerText.replace("Keyword: ", ""); | |
29 | div.addEventListener("click", function() | |
30 | { | |
31 | GM_setClipboard(div.text0); | |
32 | }); | |
33 | self.appendChild(div);*/ | |
34 | } | |
35 | ||
36 | function gen_search_url(text) | |
37 | { | |
38 | text = text.replace(" ", "+") | |
39 | text = "https://www.google.com/search?channel=fs&q=" + text + "&ie=utf-8&oe=utf-8"; | |
40 | return text; | |
41 | } | |
42 | ||
43 | $.extend($.fn.enableTextSelect = function() | |
44 | { | |
45 | return this.each(function() | |
46 | { | |
47 | $(this).unbind("mousedown"); | |
48 | create_href(this); | |
49 | }); | |
50 | }); | |
51 | ||
52 | $(this).unbind("mousedown"); | |
53 | ||
54 | $("h2.text-rep") | |
55 | .enableTextSelect() | |
56 | .attr("unselectable", "off") | |
57 | .css({"-moz-user-select":"auto","-webkit-user-select":"auto","user-select":"auto"}); | |
58 | ||
59 | console.log("Selectoid finished"); | |
60 | } | |
61 | ||
62 | if (window.top === window.self) | |
63 | { | |
64 | //withPages_jQuery(main0); | |
65 | } | |
66 | else | |
67 | { | |
68 | withPages_jQuery(main0); | |
69 | } |