-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsofurry.js
More file actions
18 lines (18 loc) · 846 Bytes
/
Copy pathsofurry.js
File metadata and controls
18 lines (18 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$waxpost.query(function ($) {
var title = $('#sfContentTitle').get(0).innerText;
var tagContainers = $('#submission_tags div.section-content');
var tags = $.map($('a', tagContainers.get(0)).get(),
function (x) { return x.innerText.replace(/ /g, '_'); });
var description = $('#sfContentDescription').get(0).innerText;
var imageURL = $('#sfContentImage a').attr('href');
chrome.runtime.sendMessage({method: 'getSettings'}, function (response) {
var url = response.settings['waxpost-wzlroot'] + 'submit/visual?' + $.param({
title: title,
tags: tags,
description: description,
baseURL: document.location,
imageURL: imageURL,
}, true);
chrome.runtime.sendMessage({method: 'openTab', properties: {url: url}});
});
});