Originally posted by NickFitz
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
A Rep-Identifying Bookmarklet
Collapse
X
Collapse
-
-
Originally posted by OwlHoot View PostI've had that, for some post of either scintillating wit or exceptional stupidity/offensiveness.
Each rep has it's own entry, with a unique post ID and user ID.Comment
-
Originally posted by Gonzo View PostI had just never posted anything that more than one person thought worthwhile repping before.“The period of the disintegration of the European Union has begun. And the first vessel to have departed is Britain”Comment
-
I just tried this in Chrome and it thought I was doing a search for that long expression. I'm sure it worked before, is this a change to CUK or to Chrome?
Originally posted by NickFitz View Post- Copy the following (very long) line of code (a triple-click anywhere in the code box ought to select it all):
(N.B. This is the new, more efficient version; the old version is left below for completeness.)
Code:javascript:(function(){var memberURL, i, limit, reputationItem, userId, reputationList = document.getElementById("latest_reputation"),reputationItems = reputationList.getElementsByTagName("li"),connections = [],insertUsernameForId = function(element, id) {var connection;if (id in connections) { connection = connections[id];connection.elements[connection.elements.length] = element;} else {connection = connections[id] = {"http": new XMLHttpRequest(),"elements": [element]};memberURL = self.location.protocol + "//" + self.location.host + "/member.php/" + id;connection.http.open("GET", memberURL, true);connection.http.onreadystatechange = function(connection) {return function() {if (connection.http.readyState == 4) {var i, limit, elements, text = connection.http.responseText,username = /<title>View Profile: (.*) - Contractor UK Bulletin Board<\/title>/.exec(text)[1];for (i = 0, elements = connection.elements, limit = elements.length; i < limit; i++) {elements[i].appendChild(document.createElement("p")).appendChild(document.createElement("b")).appendChild(document.createTextNode("Repped by: " + username));}}};}(connection);connection.http.send("");}};for (i = 0; reputationItem = reputationItems[i]; i++) {userId = /[^_]\d*$/.exec(reputationItem.id)[0];insertUsernameForId(reputationItem, userId);}})()
Code:javascript:(function() {var http, memberURL;var reputationList = document.getElementById("latest_reputation");var reputationItems = reputationList.getElementsByTagName("li");var t = [];var readystatechangeFactory = function(http, element, id) {return function() {if (http.readyState == 4) {var text = http.responseText;var userId = /<title>View Profile: (.*) - Contractor UK Bulletin Board<\/title>/.exec(text)[1];element.appendChild(document.createElement("p")).appendChild(document.createElement("b")).appendChild(document.createTextNode("Repped by: " + userId));}}};for (var i = 0, l = reputationItems.length, userId; i < l; i++) {http = new XMLHttpRequest();userId = /[^_]\d*$/.exec(reputationItems[i].id)[0];memberURL = self.location.protocol + "//" + self.location.host + "/member.php/" + userId;http.open("GET", memberURL, true);http.onreadystatechange = readystatechangeFactory(http, reputationItems[i], userId);http.send("");}})()
- Go to your settings page;
- Paste the code you just copied into your location bar;
- Hit Enter.
Wait a few seconds for the code to fetch the data, and each of your reps will acquire an additional line giving the username of the person who awarded it
You can turn that code into a bookmark on your bookmarks bar, for easy use in future, but the steps vary depending on browser; try having a look at the info in Wikipedia: Bookmarklet - Wikipedia, the free encyclopedia
I'll post a neatly-formatted version of the code below for those who want to check out how it works - it's pretty trivialOriginally posted by MaryPoppinsI'd still not breastfeed a naziOriginally posted by vetranUrine is quite nourishingComment
- Copy the following (very long) line of code (a triple-click anywhere in the code box ought to select it all):
-
Originally posted by d000hg View PostI just tried this in Chrome and it thought I was doing a search for that long expression. I'm sure it worked before, is this a change to CUK or to Chrome?Comment
-
Originally posted by d000hg View PostI just tried this in Chrome and it thought I was doing a search for that long expression. I'm sure it worked before, is this a change to CUK or to Chrome?Comment
-
Originally posted by k2p2 View PostDid it find this thread?Originally posted by MaryPoppinsI'd still not breastfeed a naziOriginally posted by vetranUrine is quite nourishingComment
-
-
Originally posted by TimberWolf View PostI tried it in all my browsers and no joy.
Edit just tried it again in IE and it worked fine!Coffee's for closersComment
-
Originally posted by Spacecadet View PostI've found that the leading bit of the snippet gets cut off when copying and pasting.
Edit just tried it again in IE and it worked fine!
Code:// ==UserScript== // @name Contractor UK crap // @namespace http://forums.contractoruk.com/ // @version 0.1 // @description enter something useful // @include http://forums.contractoruk.com/usercp.php // @copyright 2011+, NickFitz // ==/UserScript== javascript:(function(){var memberURL, i, limit, reputationItem, userId, reputationList = document.getElementById("latest_reputation"),reputationItems = reputationList.getElementsByTagName("li"),connections = [],insertUsernameForId = function(element, id) {var connection;if (id in connections) { connection = connections[id];connection.elements[connection.elements.length] = element;} else {connection = connections[id] = {"http": new XMLHttpRequest(),"elements": [element]};memberURL = self.location.protocol + "//" + self.location.host + "/member.php/" + id;connection.http.open("GET", memberURL, true);connection.http.onreadystatechange = function(connection) {return function() {if (connection.http.readyState == 4) {var i, limit, elements, text = connection.http.responseText,username = /<title>View Profile: (.*) - Contractor UK Bulletin Board<\/title>/.exec(text)[1];for (i = 0, elements = connection.elements, limit = elements.length; i < limit; i++) {elements[i].appendChild(document.createElement("p")).appendChild(document.createElement("b")).appendChild(document.createTextNode("Repped by: " + username));}}};}(connection);connection.http.send("");}};for (i = 0; reputationItem = reputationItems[i]; i++) {userId = /[^_]\d*$/.exec(reputationItem.id)[0];insertUsernameForId(reputationItem, userId);}})()
merely at clientco for the entertainmentComment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Reports of umbrella companies’ death are greatly exaggerated Nov 28 10:11
- A new hiring fraud hinges on a limited company, a passport and ‘Ade’ Nov 27 09:21
- Is an unpaid umbrella company required to pay contractors? Nov 26 09:28
- The truth of umbrella company regulation is being misconstrued Nov 25 09:23
- Labour’s plan to regulate umbrella companies: a closer look Nov 21 09:24
- When HMRC misses an FTT deadline but still wins another CJRS case Nov 20 09:20
- How 15% employer NICs will sting the umbrella company market Nov 19 09:16
- Contracting Awards 2024 hails 19 firms as best of the best Nov 18 09:13
- How to answer at interview, ‘What’s your greatest weakness?’ Nov 14 09:59
- Business Asset Disposal Relief changes in April 2025: Q&A Nov 13 09:37
Comment