- Joined
- Jan 12, 2016
- Messages
- 7,098
- Reaction score
- 21,951
- Points
- 1,263
Wonder if MTS will handle the time change properly.
...what would you even script there? There's the company name, and there's the box for the abbreviation
// ==UserScript==
// @name Mark Leman - Shorten company name
// @namespace http://your.homepage/
// @version 0.1
// @description enter something useful
// @author turker
// @grant none
// @require http://code.jquery.com/jquery-latest.min.js
// @include *
// @exclude http://www.mturkcrowd.com/*
// ==/UserScript==
if ( $("body:contains('Company:')").length ) {
document.getElementsByClassName("panel panel-primary")[0].innerHTML = "";
document.getElementsByClassName("form-control")[1].value = "N/A";
var fullText = document.getElementsByClassName("table table-condensed table-bordered")[0].getElementsByTagName("td")[1].innerText;
var toShorten = [];
toShorten[0] = "Property Management";
toShorten[1] = "Real Estate Management";
toShorten[2] = "Realty Management";
toShorten[3] = "Real Estate & Management";
toShorten[4] = "Real Estate and Management";
toShorten[5] = "Real Estate";
toShorten[6] = "Realty Group";
toShorten[7] = "Coldwell Banker";
toShorten[8] = "Properties Management";
toShorten[9] = "Apartments";
toShorten[10] = "Rentals";
toShorten[11] = "Property Co";
toShorten[12] = "Management";
toShorten[13] = "Management Group";
toShorten[14] = "Realty Mgmt";
toShorten[15] = "Realty";
toShorten[16] = "Property Mgmt";
toShorten[17] = "Property";
toShorten[18] = "Corp";
toShorten[19] = "Group";
toShorten[20] = "LLC";
toShorten[21] = "Property Mgmt";
toShorten[22] = "Properties";
toShorten[23] = "Mgmt";
toShorten[24] = "Inc";
toShorten[25] = "Investments";
toShorten[26] = "Investment";
toShorten[27] = "LTD";
toShorten[28] = "Development";
toShorten[29] = "Enterprises";
toShorten[30] = "Homes";
toShorten[31] = "Association";
toShorten[32] = "Holdings";
toShorten[33] = "Enterprise";
toShorten[34] = "Associates";
toShorten[35] = "Advanced";
toShorten[36] = "Advantage";
toShorten[37] = "Residential";
toShorten[38] = "Solutions";
toShorten[39] = "Leasing";
toShorten[40] = "Services";
toShorten[41] = "Community";
toShorten[42] = " Co";
toShorten[43] = "Southwest";
toShorten[44] = "American";
toShorten[45] = "Capital";
toShorten[46] = "Square";
toShorten[47] = "Office";
toShorten[48] = "Systems";
toShorten[49] = "Eastern";
toShorten[50] = "Western";
toShorten[51] = "Northern";
toShorten[52] = "Southern";
toShorten[53] = "East";
toShorten[54] = "West";
toShorten[55] = "Urban";
toShorten[56] = "North";
toShorten[57] = "South";
toShorten[58] = "Pacific";
toShorten[59] = "Valley";
toShorten[60] = "Park";
toShorten[61] = "Apartment";
toShorten[62] = "Equity";
toShorten[63] = "Mountain";
toShorten[64] = "Real Est";
toShorten[65] = "Performance";
toShorten[66] = "wood";
toShorten[67] = "Towers";
toShorten[68] = "Tower";
toShorten[69] = "Village";
toShorten[70] = "Buildings";
toShorten[71] = "Building";
toShorten[72] = "Street";
toShorten[73] = "Land";
toShorten[74] = "Professional";
toShorten[75] = "Service";
toShorten[76] = "First";
toShorten[77] = "Universal";
var shortened = [];
shortened[0] = "PM";
shortened[1] = "REM";
shortened[2] = "RM";
shortened[3] = "REM";
shortened[4] = "REM";
shortened[5] = "RE";
shortened[6] = "RG";
shortened[7] = "CB";
shortened[8] = "PM";
shortened[9] = "";
shortened[10] = "";
shortened[11] = "PC";
shortened[12] = "M";
shortened[13] = "MG";
shortened[14] = "RM";
shortened[15] = "R";
shortened[16] = "PM";
shortened[17] = "P";
shortened[18] = "";
shortened[19] = "";
shortened[20] = "";
shortened[21] = "PM";
shortened[22] = "P";
shortened[23] = "M";
shortened[24] = "";
shortened[25] = "Invt";
shortened[26] = "Invt";
shortened[27] = "";
shortened[28] = "Dev";
shortened[29] = "";
shortened[30] = "Hom";
shortened[31] = "Assoc";
shortened[32] = "";
shortened[33] = "";
shortened[34] = "Assoc";
shortened[35] = "Adv";
shortened[36] = "Adv";
shortened[37] = "Res";
shortened[38] = "";
shortened[39] = "L";
shortened[40] = "Svc";
shortened[41] = "Comm";
shortened[42] = "";
shortened[43] = "SW";
shortened[44] = "Amer";
shortened[45] = "Cap";
shortened[46] = "Sq";
shortened[47] = "Ofc";
shortened[48] = "Sys";
shortened[49] = "E ";
shortened[50] = "W ";
shortened[51] = "N ";
shortened[52] = "S ";
shortened[53] = "E ";
shortened[54] = "W ";
shortened[55] = "Urb";
shortened[56] = "N ";
shortened[57] = "S ";
shortened[58] = "Pac";
shortened[59] = "Val";
shortened[60] = "Pk";
shortened[61] = "";
shortened[62] = "Eq";
shortened[63] = "Mtn";
shortened[64] = "RE";
shortened[65] = "Perf";
shortened[66] = "wd";
shortened[67] = "Twr";
shortened[68] = "Twr";
shortened[69] = "Vil";
shortened[70] = "Bldg";
shortened[71] = "Bldg";
shortened[72] = "St";
shortened[73] = "Lnd";
shortened[74] = "Pro";
shortened[75] = "Svc";
shortened[76] = "1st";
shortened[77] = "Univ";
for (i=0;i<toShorten.length;i++) {
if (fullText.indexOf(toShorten[i]) > -1) {
fullText = fullText.replace(toShorten[i],shortened[i]).trim();
}
}
document.getElementsByClassName("form-control")[0].value = fullText;
}
Title: female voice recording needed | PANDA Requester: khalil nahas [AI8R3HSUIAUZ5] (Contact) (TO): [Pay: N/A] [Fair: N/A] [Comm: N/A] [Fast: N/A] Description: i am creating an animation movie, and need a female voice recording Time: 30 minutes HITs Available: 1 Reward: $2.00 Qualifications: None |
Make the array properly and it will be easier to manage.Code:// ==UserScript== // @name Mark Leman - Shorten company name // @namespace http://your.homepage/ // @version 0.1 // @description enter something useful // @author turker // @grant none // @require http://code.jquery.com/jquery-latest.min.js // @include * // @exclude http://www.mturkcrowd.com/* // ==/UserScript== if ( $("body:contains('Company:')").length ) { document.getElementsByClassName("panel panel-primary")[0].innerHTML = ""; document.getElementsByClassName("form-control")[1].value = "N/A"; var fullText = document.getElementsByClassName("table table-condensed table-bordered")[0].getElementsByTagName("td")[1].innerText; var toShorten = []; toShorten[0] = "Property Management"; toShorten[1] = "Real Estate Management"; toShorten[2] = "Realty Management"; toShorten[3] = "Real Estate & Management"; toShorten[4] = "Real Estate and Management"; toShorten[5] = "Real Estate"; toShorten[6] = "Realty Group"; toShorten[7] = "Coldwell Banker"; toShorten[8] = "Properties Management"; toShorten[9] = "Apartments"; toShorten[10] = "Rentals"; toShorten[11] = "Property Co"; toShorten[12] = "Management"; toShorten[13] = "Management Group"; toShorten[14] = "Realty Mgmt"; toShorten[15] = "Realty"; toShorten[16] = "Property Mgmt"; toShorten[17] = "Property"; toShorten[18] = "Corp"; toShorten[19] = "Group"; toShorten[20] = "LLC"; toShorten[21] = "Property Mgmt"; toShorten[22] = "Properties"; toShorten[23] = "Mgmt"; toShorten[24] = "Inc"; toShorten[25] = "Investments"; toShorten[26] = "Investment"; toShorten[27] = "LTD"; toShorten[28] = "Development"; toShorten[29] = "Enterprises"; toShorten[30] = "Homes"; toShorten[31] = "Association"; toShorten[32] = "Holdings"; toShorten[33] = "Enterprise"; toShorten[34] = "Associates"; toShorten[35] = "Advanced"; toShorten[36] = "Advantage"; toShorten[37] = "Residential"; toShorten[38] = "Solutions"; toShorten[39] = "Leasing"; toShorten[40] = "Services"; toShorten[41] = "Community"; toShorten[42] = " Co"; toShorten[43] = "Southwest"; toShorten[44] = "American"; toShorten[45] = "Capital"; toShorten[46] = "Square"; toShorten[47] = "Office"; toShorten[48] = "Systems"; toShorten[49] = "Eastern"; toShorten[50] = "Western"; toShorten[51] = "Northern"; toShorten[52] = "Southern"; toShorten[53] = "East"; toShorten[54] = "West"; toShorten[55] = "Urban"; toShorten[56] = "North"; toShorten[57] = "South"; toShorten[58] = "Pacific"; toShorten[59] = "Valley"; toShorten[60] = "Park"; toShorten[61] = "Apartment"; toShorten[62] = "Equity"; toShorten[63] = "Mountain"; toShorten[64] = "Real Est"; toShorten[65] = "Performance"; toShorten[66] = "wood"; toShorten[67] = "Towers"; toShorten[68] = "Tower"; toShorten[69] = "Village"; toShorten[70] = "Buildings"; toShorten[71] = "Building"; toShorten[72] = "Street"; toShorten[73] = "Land"; toShorten[74] = "Professional"; toShorten[75] = "Service"; toShorten[76] = "First"; toShorten[77] = "Universal"; var shortened = []; shortened[0] = "PM"; shortened[1] = "REM"; shortened[2] = "RM"; shortened[3] = "REM"; shortened[4] = "REM"; shortened[5] = "RE"; shortened[6] = "RG"; shortened[7] = "CB"; shortened[8] = "PM"; shortened[9] = ""; shortened[10] = ""; shortened[11] = "PC"; shortened[12] = "M"; shortened[13] = "MG"; shortened[14] = "RM"; shortened[15] = "R"; shortened[16] = "PM"; shortened[17] = "P"; shortened[18] = ""; shortened[19] = ""; shortened[20] = ""; shortened[21] = "PM"; shortened[22] = "P"; shortened[23] = "M"; shortened[24] = ""; shortened[25] = "Invt"; shortened[26] = "Invt"; shortened[27] = ""; shortened[28] = "Dev"; shortened[29] = ""; shortened[30] = "Hom"; shortened[31] = "Assoc"; shortened[32] = ""; shortened[33] = ""; shortened[34] = "Assoc"; shortened[35] = "Adv"; shortened[36] = "Adv"; shortened[37] = "Res"; shortened[38] = ""; shortened[39] = "L"; shortened[40] = "Svc"; shortened[41] = "Comm"; shortened[42] = ""; shortened[43] = "SW"; shortened[44] = "Amer"; shortened[45] = "Cap"; shortened[46] = "Sq"; shortened[47] = "Ofc"; shortened[48] = "Sys"; shortened[49] = "E "; shortened[50] = "W "; shortened[51] = "N "; shortened[52] = "S "; shortened[53] = "E "; shortened[54] = "W "; shortened[55] = "Urb"; shortened[56] = "N "; shortened[57] = "S "; shortened[58] = "Pac"; shortened[59] = "Val"; shortened[60] = "Pk"; shortened[61] = ""; shortened[62] = "Eq"; shortened[63] = "Mtn"; shortened[64] = "RE"; shortened[65] = "Perf"; shortened[66] = "wd"; shortened[67] = "Twr"; shortened[68] = "Twr"; shortened[69] = "Vil"; shortened[70] = "Bldg"; shortened[71] = "Bldg"; shortened[72] = "St"; shortened[73] = "Lnd"; shortened[74] = "Pro"; shortened[75] = "Svc"; shortened[76] = "1st"; shortened[77] = "Univ"; for (i=0;i<toShorten.length;i++) { if (fullText.indexOf(toShorten[i]) > -1) { fullText = fullText.replace(toShorten[i],shortened[i]).trim(); } } document.getElementsByClassName("form-control")[0].value = fullText; }
Title: Find contact details from websites | PANDA Requester: A S [A1PQWXUNE11KWQ] (Contact) (TO): [Pay: N/A] [Fair: N/A] [Comm: N/A] [Fast: N/A] Description: Given the Company Name, find the contact details from their official website Time: 20 minutes HITs Available: 23 Reward: $0.20 Qualifications: None |
if ( $("body:contains('Company:')").length ) {
document.getElementsByClassName("panel panel-primary")[0].innerHTML = "";
document.getElementsByClassName("form-control")[1].value = "N/A";
let fullText = document.getElementsByClassName("table table-condensed table-bordered")[0].getElementsByTagName("td")[1].innerText;
const replace = [
[`Property Management`, `PM`],
[`Real Estate Management`, `REM`]
];
for (let i = 0; i< replace.length; i ++)
if (fullText.indexOf(replace[i][0]) > -1)
fullText = fullText.replace(replace[i][0], replace[i][1]).trim();
document.getElementsByClassName("form-control")[0].value = fullText;
}
TY that looks easier@turker
Nested array is much better for this, I did the first 2 to show an example.
Code:if ( $("body:contains('Company:')").length ) { document.getElementsByClassName("panel panel-primary")[0].innerHTML = ""; document.getElementsByClassName("form-control")[1].value = "N/A"; let fullText = document.getElementsByClassName("table table-condensed table-bordered")[0].getElementsByTagName("td")[1].innerText; const replace = [ [`Property Management`, `PM`], [`Real Estate Management`, `REM`] ]; for (let i = 0; i< replace.length; i ++) if (fullText.indexOf(replace[i][0]) > -1) fullText = fullText.replace(replace[i][0], replace[i][1]).trim(); document.getElementsByClassName("form-control")[0].value = fullText; }
Title: Answer questions about images! (Real) | PANDA Requester: Research Tasks [A1CEBF7WRZ74YK] (Contact) (TO): [Pay: 3.21] [Fair: 4.71] [Comm: 4.22] [Fast: 4.37] Description: You will answer questions about images. Time: 60 minutes HITs Available: 2869 Reward: $0.10 Qualifications: Total approved HITs is not less than 500; HIT approval rate (%) is not less than 95; Location is US; |
Clever.Code:// ==UserScript== // @name Mark Leman - Shorten company name // @namespace http://your.homepage/ // @version 0.1 // @description enter something useful // @author turker // @grant none // @require http://code.jquery.com/jquery-latest.min.js // @include * // @exclude http://www.mturkcrowd.com/* // ==/UserScript== if ( $("body:contains('Company:')").length ) { document.getElementsByClassName("panel panel-primary")[0].innerHTML = ""; document.getElementsByClassName("form-control")[1].value = "N/A"; var fullText = document.getElementsByClassName("table table-condensed table-bordered")[0].getElementsByTagName("td")[1].innerText; var toShorten = []; toShorten[0] = "Property Management"; toShorten[1] = "Real Estate Management"; toShorten[2] = "Realty Management"; toShorten[3] = "Real Estate & Management"; toShorten[4] = "Real Estate and Management"; toShorten[5] = "Real Estate"; toShorten[6] = "Realty Group"; toShorten[7] = "Coldwell Banker"; toShorten[8] = "Properties Management"; toShorten[9] = "Apartments"; toShorten[10] = "Rentals"; toShorten[11] = "Property Co"; toShorten[12] = "Management"; toShorten[13] = "Management Group"; toShorten[14] = "Realty Mgmt"; toShorten[15] = "Realty"; toShorten[16] = "Property Mgmt"; toShorten[17] = "Property"; toShorten[18] = "Corp"; toShorten[19] = "Group"; toShorten[20] = "LLC"; toShorten[21] = "Property Mgmt"; toShorten[22] = "Properties"; toShorten[23] = "Mgmt"; toShorten[24] = "Inc"; toShorten[25] = "Investments"; toShorten[26] = "Investment"; toShorten[27] = "LTD"; toShorten[28] = "Development"; toShorten[29] = "Enterprises"; toShorten[30] = "Homes"; toShorten[31] = "Association"; toShorten[32] = "Holdings"; toShorten[33] = "Enterprise"; toShorten[34] = "Associates"; toShorten[35] = "Advanced"; toShorten[36] = "Advantage"; toShorten[37] = "Residential"; toShorten[38] = "Solutions"; toShorten[39] = "Leasing"; toShorten[40] = "Services"; toShorten[41] = "Community"; toShorten[42] = " Co"; toShorten[43] = "Southwest"; toShorten[44] = "American"; toShorten[45] = "Capital"; toShorten[46] = "Square"; toShorten[47] = "Office"; toShorten[48] = "Systems"; toShorten[49] = "Eastern"; toShorten[50] = "Western"; toShorten[51] = "Northern"; toShorten[52] = "Southern"; toShorten[53] = "East"; toShorten[54] = "West"; toShorten[55] = "Urban"; toShorten[56] = "North"; toShorten[57] = "South"; toShorten[58] = "Pacific"; toShorten[59] = "Valley"; toShorten[60] = "Park"; toShorten[61] = "Apartment"; toShorten[62] = "Equity"; toShorten[63] = "Mountain"; toShorten[64] = "Real Est"; toShorten[65] = "Performance"; toShorten[66] = "wood"; toShorten[67] = "Towers"; toShorten[68] = "Tower"; toShorten[69] = "Village"; toShorten[70] = "Buildings"; toShorten[71] = "Building"; toShorten[72] = "Street"; toShorten[73] = "Land"; toShorten[74] = "Professional"; toShorten[75] = "Service"; toShorten[76] = "First"; toShorten[77] = "Universal"; var shortened = []; shortened[0] = "PM"; shortened[1] = "REM"; shortened[2] = "RM"; shortened[3] = "REM"; shortened[4] = "REM"; shortened[5] = "RE"; shortened[6] = "RG"; shortened[7] = "CB"; shortened[8] = "PM"; shortened[9] = ""; shortened[10] = ""; shortened[11] = "PC"; shortened[12] = "M"; shortened[13] = "MG"; shortened[14] = "RM"; shortened[15] = "R"; shortened[16] = "PM"; shortened[17] = "P"; shortened[18] = ""; shortened[19] = ""; shortened[20] = ""; shortened[21] = "PM"; shortened[22] = "P"; shortened[23] = "M"; shortened[24] = ""; shortened[25] = "Invt"; shortened[26] = "Invt"; shortened[27] = ""; shortened[28] = "Dev"; shortened[29] = ""; shortened[30] = "Hom"; shortened[31] = "Assoc"; shortened[32] = ""; shortened[33] = ""; shortened[34] = "Assoc"; shortened[35] = "Adv"; shortened[36] = "Adv"; shortened[37] = "Res"; shortened[38] = ""; shortened[39] = "L"; shortened[40] = "Svc"; shortened[41] = "Comm"; shortened[42] = ""; shortened[43] = "SW"; shortened[44] = "Amer"; shortened[45] = "Cap"; shortened[46] = "Sq"; shortened[47] = "Ofc"; shortened[48] = "Sys"; shortened[49] = "E "; shortened[50] = "W "; shortened[51] = "N "; shortened[52] = "S "; shortened[53] = "E "; shortened[54] = "W "; shortened[55] = "Urb"; shortened[56] = "N "; shortened[57] = "S "; shortened[58] = "Pac"; shortened[59] = "Val"; shortened[60] = "Pk"; shortened[61] = ""; shortened[62] = "Eq"; shortened[63] = "Mtn"; shortened[64] = "RE"; shortened[65] = "Perf"; shortened[66] = "wd"; shortened[67] = "Twr"; shortened[68] = "Twr"; shortened[69] = "Vil"; shortened[70] = "Bldg"; shortened[71] = "Bldg"; shortened[72] = "St"; shortened[73] = "Lnd"; shortened[74] = "Pro"; shortened[75] = "Svc"; shortened[76] = "1st"; shortened[77] = "Univ"; for (i=0;i<toShorten.length;i++) { if (fullText.indexOf(toShorten[i]) > -1) { fullText = fullText.replace(toShorten[i],shortened[i]).trim(); } } document.getElementsByClassName("form-control")[0].value = fullText; }
np, it will keep your original wording and what its getting replaced with next to each other so its easy to reference/make.TY that looks easier![]()
We're still playing if you want to join, info in spoiler.Anyone want to play cards against humanity? Join us!
Log in or register now. to view Spoiler content!
that is a lot easier to follow without making mistakesnp, it will keep your original wording and what its getting replaced with next to each other so its easy to reference/make.
Title: Video Viewing: evaluating study paradigms for studying cognition | PANDA Worker: Preview | Accept | Requester Requester: Cusack Lab [A2TSQOVVLPG5K8] (Contact) TO: [Pay: 3.32] [Fair: 4.00] [Comm: 2.71] [Fast: 3.94] [Reviews: 25] [ToS: 1] Description: You will record a video of yourself viewing two movie clips, one intact and one scrambled (~19 min) Time: 45 minutes HITs Available: 1 Reward: $3.00 Qualifications: None; |
HIT exported from Mturk Suite v1.14.9 |
Title: Complete the sentence with the first word that comes to mind | PANDA Worker: Preview | Accept | Requester Requester: James Nye [A1GQTAR9OW6VBO] (Contact) TO: [Pay: 4.75] [Fair: 5.00] [Comm: N/A] [Fast: 5.00] [Reviews: 4] [ToS: 0] Description: Read the sentence fragment, Write the first word you can think of that would complete the sentence. Time: 30 minutes HITs Available: 1 Reward: $0.04 Qualifications: Total approved HITs is greater than 0; HIT approval rate (%) is not less than 95; Location is US; |
HIT exported from Mturk Suite v1.14.9 |
$1 a second you say? Sign me up.3 seconds.
Title: Video Viewing: evaluating study paradigms for studying cognition | PANDA
Worker: Preview | Accept | Requester
Requester: Cusack Lab [A2TSQOVVLPG5K8] (Contact)
TO: [Pay: 3.32] [Fair: 4.00] [Comm: 2.71] [Fast: 3.94] [Reviews: 25] [ToS: 1]
Description: You will record a video of yourself viewing two movie clips, one intact and one scrambled (~19 min)
Time: 45 minutes
HITs Available: 1
Reward: $3.00
Qualifications: None;
HIT exported from Mturk Suite v1.14.9
3 seconds?3 seconds.
Title: Video Viewing: evaluating study paradigms for studying cognition | PANDA
Worker: Preview | Accept | Requester
Requester: Cusack Lab [A2TSQOVVLPG5K8] (Contact)
TO: [Pay: 3.32] [Fair: 4.00] [Comm: 2.71] [Fast: 3.94] [Reviews: 25] [ToS: 1]
Description: You will record a video of yourself viewing two movie clips, one intact and one scrambled (~19 min)
Time: 45 minutes
HITs Available: 1
Reward: $3.00
Qualifications: None;
HIT exported from Mturk Suite v1.14.9
$1 a second you say? Sign me up.
Haha! I totally grabbed the wrong HIT. I meant to link to the $0.06 James Nye HIT. That was 3 seconds. I don't know anything about Cusack Lab.3 seconds?
This is Y2K all over again.Wonder if MTS will handle the time change properly.