Commit Graph
26 Commits
Author SHA1 Message Date
Anders Waldenborg acb7327520 Allow changing url shortening service
This changes so that the name of the module used to do url shortening is
based on an property from configuration.

By default this new 'urlShortenService' property has the value 'none',
which will make it use the 'urlshorten-none.js' module which never
shortens the url. The previous 'urlshorten-google.js' module is
activated by setting it to 'google'.

Hopefully this makes it easy for an standalone compiler-explorer
installation to use an internal url shortening service to avoid leaking
source outside of the organization.
2018-03-19 16:53:04 +01:00
Anders Waldenborg ca8efc4572 Make existence of 'Short' share link clientside decision
Move checking of google api key into urlshorten-google module so it is
entirely decided in that module if it can shorten or not.

If the urlshorten module returns a falselike object the corresponding
like with dynamically be removed.

This refactor will make it easier to drop in an alternative url
shortening service. It also has the side effect that when google url
shortening fails the 'Short' link will not be shown with a non-shortened
url.
2018-03-19 16:53:04 +01:00
RabsRincon 6ef87b5ef9 Fix copyright dates and normalize text 2018-02-27 14:58:21 +01:00
RabsRincon 35e4dfc77a Let the user know we're loading the short url 2018-02-16 16:52:45 +01:00
RabsRincon 670afd8921 Move to ESLint
Somewhat compilant!
2018-02-13 14:49:07 +01:00
RabsRincon 62e68304e9 Format files 2018-02-07 23:58:21 +01:00
jaredwy 2e612c4216 Fixing a sharing bug that was including a url from node modules not static 2018-01-31 19:03:37 +11:00
jaredwy 70556a6c65 first pass at using webpack/yarn rather than bower and require.js 2018-01-28 19:09:33 +11:00
RabsRincon fc75208dac New year, new date 2018-01-01 16:44:04 +01:00
jaredwy 2f79045700 Update to use bigint library to be able to properly display greater than 2^53 2017-04-29 10:12:02 +10:00
Rubén Rincón 3a41af0f55 Url Too Long to be shortened (How ironic...) Alert is now a notification. 2017-03-30 20:39:39 +02:00
Matt Godbolt 1c084ea6f4 IntelliJ autoformat 2017-03-15 07:43:01 -05:00
Rubén Rincón 7215153b63 Fixes tests. I tought Javascript was ok with that separation. Well, you learn something new every day 2017-03-14 18:04:31 +01:00
Rubén Rincón 6b5d1887ce An alert is issued when the URL shortener fails, explaining that it's probably because of length limits. This is a temporary solution while Matt creates a local shortener 2017-03-14 17:18:15 +01:00
Matt Godbolt ddddc8e086 Read-only embedded 2017-03-06 21:50:15 -06:00
Matt Godbolt ef975bdd2f Move to using pug templates to assemble both main view and embedded view. Means a reduction in code duplication between embedded and non-embedded; and saves a round-trip getting the options. 2017-03-06 18:04:42 -06:00
Matt Godbolt c3e8d35695 Noodling on embedded stuff 2017-03-06 18:03:17 -06:00
Matt Godbolt 8b863675a7 Remove absolute path references 2017-02-25 13:18:14 -06:00
Matt Godbolt b6e9a4658b Another year, another copyright update 2017-01-02 10:14:46 -06:00
Matt Godbolt 4ea8389ad4 Cheesey solution to no tooltip 2016-11-04 08:10:10 -05:00
Matt Godbolt a17a2ec7e9 Fix short urls 2016-11-01 21:43:22 -05:00
Matt Godbolt caf8a5e8a5 Move links into a share button 2016-11-01 21:27:02 -05:00
Matt Godbolt 5e14b1a254 Hide short link unless it's enabled 2016-09-16 08:47:24 -05:00
Matt Godbolt 624abd9870 Short URL support 2016-09-16 08:15:03 -05:00
Matt Godbolt 7c7cde93af Add copyrights 2016-09-12 18:26:47 -05:00
Matt Godbolt 3600d7ac7e First move towards rewrite 2016-08-18 23:23:22 -05:00