From 42ca7dd2fd3b5ea3ba3152c5ed76d6eaeade53e5 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Thu, 12 Mar 2015 18:03:28 +0100 Subject: [PATCH] remove compiled js file from repo --- src/proboard_saver.js | 430 ------------------------------------------ 1 file changed, 430 deletions(-) delete mode 100644 src/proboard_saver.js diff --git a/src/proboard_saver.js b/src/proboard_saver.js deleted file mode 100644 index 652c748..0000000 --- a/src/proboard_saver.js +++ /dev/null @@ -1,430 +0,0 @@ -// Generated by CoffeeScript 1.8.0 -(function() { - var casper, findBoards, findPages, findPosts, findThreads, findUserLinks, fs, getUser, loadImages, missingArgumentError, password, proboard, proboardName, proboardNr, proboardUrl, proboardUserUrl, readBoard, replaceHtml, user, utils; - - casper = require('casper').create({ - verbose: false, - logLevel: 'info', - pageSettings: { - webSecurityEnabled: false - } - }); - - utils = require('utils'); - - fs = require('fs'); - - casper.on('error', function(msg, trace) { - return this.echo("Error: " + msg, "ERROR"); - }); - - casper.on('page.error', function(msg, trace) { - return this.echo("Error: " + msg, "ERROR"); - }); - - casper.on('remote.message', function(msg, trace) { - if (!/Unsafe JavaScript attempt/.test(msg)) { - return this.echo("remote log: " + msg, "INFO"); - } - }); - - loadImages = function(searchString) { - var detailImage, image, imageName, imageParts, images, re, _i, _len; - images = searchString.match(/\[img\](.*?)\[\/img\]/g); - if (images) { - for (_i = 0, _len = images.length; _i < _len; _i++) { - image = images[_i]; - detailImage = image.match(/\[img\](.*?)\[\/img\]/)[1]; - imageParts = detailImage.split('/'); - imageName = imageParts[imageParts.length - 1]; - console.log("\t\tdownloading image '" + imageName + "'..."); - casper.download(detailImage, "data/images/" + imageName); - re = new RegExp("\\[img\\]" + detailImage + "\\[/img\\]", "i"); - searchString = searchString.replace(re, "[img]{{baseurl}}/images/" + imageName + "[/img]"); - } - } - return searchString; - }; - - replaceHtml = function(element) { - var bold, boldElements, colour, colourElements, cursive, cursiveElements, dummyContent, dummyElements, dummySpan, finalText, image, images, link, linkElements, message, quote, quoteAvatar, quoteClear, quoteHeader, quoteHeaderNode, registeredUserNode, underlined, underlinedElements, user, video, videos, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _o, _p; - images = Array.prototype.map.call(element.querySelectorAll('img'), function(img) { - return { - src: img.src, - alt: img.hasAttribute('alt') ? img.alt : '' - }; - }); - for (_i = 0, _len = images.length; _i < _len; _i++) { - image = images[_i]; - element.innerHTML = element.innerHTML.replace(/]*>/, "[img" + (image.alt ? '=' + image.alt : '') + "]" + image.src + "[/img]"); - } - videos = Array.prototype.map.call(element.querySelectorAll("iframe[title='YouTube video player']"), function(video) { - return video.src.split('/')[4].split('?')[0]; - }); - for (_j = 0, _len1 = videos.length; _j < _len1; _j++) { - video = videos[_j]; - element.innerHTML = element.innerHTML.replace(/