-2
Introduction
Hello! This is my second post, and I decided to do one which is more language specific, since my last one was very much orientated towards mathematical languages, and thus did not leave room for languages like JavaScript or HTML. If there is anyway to make this more clear, or to tidy up a wording problem, please do not hesitate to leave a comment below this post.
The Task
You have to create a JavaScript program which, when pasted into chrome's omnibar will open up the wonderful Google page.
The Catch
You may not use any characters within the google URL ("ceghlmopstw") or those characters in any other base. Also, you may not use any other links, redirect links or IP addressed.
Extra Information
- You can put JavaScript code in the omnibar by doing "JavaScript://Code"
You cannot copy and paste javascript code into the omnibar. The code below will actually strip the "javascript:" part, the result of which is to simply search for "alert("Hello World!"). To get around this, I suggest typing your code in an IDE, such as Notepad++ without the "JavaScript:" and then add it in the omnibar when you go to test it.
javascript:alert("Hello World!")
As this is code golf, the shortest entry wins!
Bonuses
- Each bonus will take away a certain amount of points from the total amount of characters, bonuses that are percentages will stack, so if one received a 20% bonus and a 25% bonus, they would in essence receive a 45% bonus.
- 25% - Changeable - You can change the website URL without doing complicated maths, or having to change the entire code!
- 50 chars - NoScript - Don't use any JavaScript! I have no idea how your going to achieve this!
- 25 chars - Exceptional - Don't use the ".:/" characters in your code. Removed from the main task as "JavaScript:" requires a colon.
- 15 chars - Multi-lingual - Make a solution that makes use of 3 or more languages!
TL;DR
You must code something to put in the chrome omnibar, that then redirects you to https://www.google.com without using the characters "ceghlmopstw"
Leader Board
soktinpk - 24 - Exceptional - First post to complete it in a way I had expected!
Someone - -40 - NoScript - Used a redirect link however. Points for finding one without those characters, all of the ones I just found did!
Von llya - -37 - NoScript - Used an IP address!
2Does anyone else get nervous, while waiting for the first comment or answer, whether people will hate your task and down vote you? I always have this mini-panic attack that delays me from posting questions xD! While trying to download Paint.net (computer rebuild) my internet speed is 128Kbps... back to ISDN speeds. – Alexander Craggs – 2014-08-24T21:01:19.663
1Just an fyi that language specific scripts are generally discouraged (as you may well know). This looks fine however since it's not like the omnibar understands C++ ;) (I admit I'm not bothering to try.) – Calvin's Hobbies – 2014-08-24T21:30:51.283
1What counts as "opening up the wonderful Google page"? In your answer, bear in mind that for people in most countries Google will respond to a request for
www.google.com
with a redirect to a country-specific site. Also, how is one supposed to write ajavascript:
URL without using the charactersscpt
? – Peter Taylor – 2014-08-24T21:33:23.453I should add that "anything similar to your idea" is subjective and has no place in a scoring system on this site. – Peter Taylor – 2014-08-24T21:35:09.643
@Calvin'sHobbies Thanks for the heads up! For my next posts I will try to think up an interesting puzzle for all languages! – Alexander Craggs – 2014-08-24T21:35:23.963
@PeterTaylor You have made some very good points. I believe that if everyone makes a program that heads to www.google.com, it will be fair for all countries, plus, as you said, it would go to their country-specific site anyway. I didn't quite think that JavaScript would use the letter disallowed, even though I did with the colon! I'll edit that in the post. For the thing about similarity, I don't really know how to put it. I want to discourage posts that just steal another persons idea and golf it better. Do you have any ideas? – Alexander Craggs – 2014-08-24T21:37:55.790
@PopeyGilbert I've found that people stealing other's code without attribution is rare and likely to be downvoted, so I wouldn't worry about it too much. – Calvin's Hobbies – 2014-08-24T21:43:43.197
@Calvin'sHobbies Okay, would you recommend I remove the bonus completely? – Alexander Craggs – 2014-08-24T21:44:22.007
1@PopeyGilbert Probably since it is subjective and people are likely to think of the same solutions themselves anyway (e.g. you and "Someone" both thought of using a URL shortener) – Calvin's Hobbies – 2014-08-24T21:47:25.103
What you seem to be saying is that you want to discourage golfing on a question tagged [tag:code-golf]. That doesn't make any sense to me. – Peter Taylor – 2014-08-24T21:50:51.623
@PeterTaylor Is this about using multiple languages? I feel that although golfing is a very fun thing to do. It's better to have a level playing table. Golf against people using your own language. – Alexander Craggs – 2014-08-24T21:52:06.827
I had an idea but id doesn't works because there is a
c
, and I can't find a way to avoid it :'(%67%6f%6f%67%6c%65.%63%6f%6d
. – sebcap26 – 2014-08-25T10:22:38.003This is Mision Impossible – Konijn – 2014-08-25T16:28:58.060
It does seem to be very hard, however we did get our first answer! Which is great =) – Alexander Craggs – 2014-08-26T19:12:49.073