Feature: Use page title as default description

This commit is contained in:
winkidney
2018-08-26 00:31:24 -07:00
parent fadb898804
commit 2d9b952482
2 changed files with 3 additions and 0 deletions

View File

@@ -94,6 +94,7 @@
image.onclick = function() {
var popUrl = getFormUrl() + encodeURIComponent(imageUrl);
popUrl = popUrl + '&referer=' + encodeURIComponent(window.location);
popUrl = popUrl + '&description=' + encodeURIComponent(document.title);
window.open(popUrl);
closePinry();
};

View File

@@ -68,6 +68,7 @@ $(window).load(function() {
$('#pin-form-tags')
],
pinFromUrl = getUrlParameter('pin-image-url'),
pinFromDescription = getUrlParameter('description'),
pinFromReferer = getUrlParameter('referer');
// If editable grab existing data
if (editPinId) {
@@ -122,6 +123,7 @@ $(window).load(function() {
$('#pin-form-image-upload').parent().css('display', 'none');
$('#pin-form-image-url').val(pinFromUrl);
$('#pin-form-referer').val(pinFromReferer);
$('#pin-form-description').val(pinFromDescription);
$('.navbar').css('display', 'none');
modal.css({
'margin-top': -35,