Skip to content
Permalink
Browse files

Embedded the TV image files since they don't seem to cache for some b…

…rowsers w/ MTS
  • Loading branch information...
Chris Turk
Chris Turk committed Feb 28, 2019
1 parent 078a0c9 commit f5523a1275175b5bf43f49967613aae1d8f266d8
@@ -199,7 +199,7 @@ function finderProcess() {
requesterTurkerViewReviews.dataset.key = hit.requester_id;

const turkerviewIcon = document.createElement(`img`);
turkerviewIcon.src = `https://turkerview.com/assets/images/tv-white.png`;
turkerviewIcon.src = chrome.extension.getURL(`media/images/tv-white.png`);
turkerviewIcon.style.maxHeight = `13px`;
requesterTurkerViewReviews.appendChild(turkerviewIcon);
requesterContainer.appendChild(requesterTurkerViewReviews);
@@ -79,7 +79,12 @@
"bootstrap/js/*",
"bootstrap/css/*",
"fontawesome/webfonts/*",
"hit_tracker/hit_tracker.html"
"hit_tracker/hit_tracker.html",
"media/images/tv-mts-red.png",
"media/images/tv-mts-orange.png",
"media/images/tv-mts-green.png",
"media/images/tv-unrated.png",
"media/images/tv-white.png"
],

"content_scripts": [
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -230,7 +230,7 @@ async function handleTurkerview(rids) {
span.tabIndex = 0;

const icon = document.createElement(`img`);
icon.src = `https://turkerview.com/assets/images/tv-${turkerviewIcon(review)}.png`;
icon.src = chrome.extension.getURL(`media/images/tv-${turkerviewIcon(review)}.png`);
icon.style.maxHeight = `16px`;
span.appendChild(icon);
el.appendChild(span);
@@ -104,7 +104,7 @@ function hitDataPopover(button, hit, reward, status = `ok`) {
let temp_key = hit.requester_id.concat(hit.monetary_reward.amount_in_dollars.toFixed(2), hit.title);

let hourly = json[temp_key] ? (3600/json[temp_key].avg_completion)*hit.monetary_reward.amount_in_dollars : null;
const hitButton = HTML`<span class="btn btn-sm text-primary" tabIndex="0" data-tvhit="${temp_key}" data-reward="${hit.monetary_reward.amount_in_dollars.toFixed(2)}"><img src="https://turkerview.com/assets/images/tv-${hitReviewsTVClass(hourly)}.png" style="max-height: 16px;"></img></span>`;
const hitButton = HTML`<span class="btn btn-sm text-primary" tabIndex="0" data-tvhit="${temp_key}" data-reward="${hit.monetary_reward.amount_in_dollars.toFixed(2)}"><img src="${chrome.extension.getURL(`media/images/tv-${hitReviewsTVClass(hourly)}.png`)}" style="max-height: 16px;"></img></span>`;

row
.querySelector(`.project-name-column`)
@@ -141,7 +141,7 @@ function hitDataPopover(button, hit, reward, status = `ok`) {
let temp_key = hit.requester_id.concat(hit.monetary_reward.amount_in_dollars.toFixed(2), hit.title);

let hourly = null;
const hitButton = HTML`<span class="btn btn-sm text-primary" tabIndex="0" data-tvhit="${temp_key}" data-reward="${hit.monetary_reward.amount_in_dollars.toFixed(2)}"><img src="https://turkerview.com/assets/images/tv-${hitReviewsTVClass(hourly)}.png" style="max-height: 16px;"></img></span>`;
const hitButton = HTML`<span class="btn btn-sm text-primary" tabIndex="0" data-tvhit="${temp_key}" data-reward="${hit.monetary_reward.amount_in_dollars.toFixed(2)}"><img src="${chrome.extension.getURL(`media/images/tv-${hitReviewsTVClass(hourly)}.png`)}" style="max-height: 16px;"></img></span>`;

row
.querySelector(`.project-name-column`)
@@ -116,11 +116,11 @@ function buildAndAppend(json, assignableHitsCount){
let file = taskHourlyTVClass(json.avg_hourly);

document.querySelectorAll(`.work-pipeline-action`).forEach(el => {
el.insertAdjacentHTML(`afterbegin`, `<a class="btn btn-secondary tv-task-review-data" href="#" style="margin-right: 5px;"><img src="https://turkerview.com/assets/images/tv-${file}.png" style="max-height: 14px;"></img></a>`);
el.insertAdjacentHTML(`afterbegin`, `<a class="btn btn-secondary tv-task-review-data" href="#" style="margin-right: 5px;"><img src="${chrome.extension.getURL(`media/images/tv-${file}.png`)}" style="max-height: 14px;"></img></a>`);
})

document.querySelectorAll(`.task-project-title`).forEach(el => {
el.insertAdjacentHTML(`afterbegin`, `<div class="tv-task-review-data" style="display: inline-block; margin-right: 4px; cursor: pointer;"><img src="https://turkerview.com/assets/images/tv-${file}.png" style="max-height: 16px;"></img></div>`);
el.insertAdjacentHTML(`afterbegin`, `<div class="tv-task-review-data" style="display: inline-block; margin-right: 4px; cursor: pointer;"><img src="${chrome.extension.getURL(`media/images/tv-${file}.png`)}" style="max-height: 16px;"></img></div>`);
})

document.getElementById(`taskReviewDataModal`).addEventListener(`click`, function(){

0 comments on commit f5523a1

Please sign in to comment.
You can’t perform that action at this time.