googlud / to string

// ==UserScript==
// @name         to string
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.sex.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    var link = '';
    $('a.image_wrapper').each(function () {
        var href = location.origin + $(this).attr('href');
        link +='<a href="' + href + '">' + ($(this).attr('title') || href) + '</a><br/>\n';
    })
    console.info(link);
    /*
    var html = $('.masonry_box a.image_wrapper').toArray().reduce(function (accumulator, current, index, array) {
    return accumulator + '<a href="' + location.origin + '/' + $(current).attr('href') + '">' + $(current).attr('title') + '</a><br/>\n'
}, '');
console.log(html)
*/

})();