-3
\$\begingroup\$

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!
\$\endgroup\$
14
  • 2
    \$\begingroup\$ Does 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. \$\endgroup\$ Aug 24, 2014 at 21:01
  • 1
    \$\begingroup\$ Just 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.) \$\endgroup\$ Aug 24, 2014 at 21:30
  • 1
    \$\begingroup\$ What 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 a javascript: URL without using the characters scpt? \$\endgroup\$ Aug 24, 2014 at 21:33
  • \$\begingroup\$ I should add that "anything similar to your idea" is subjective and has no place in a scoring system on this site. \$\endgroup\$ Aug 24, 2014 at 21:35
  • 1
    \$\begingroup\$ @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) \$\endgroup\$ Aug 24, 2014 at 21:47

2 Answers 2

3
\$\begingroup\$

Javascript - 49 chars + (Exceptional bonus) = 24

There's a catch for this one; you have to have it open on this page. Also it will break as more links come to it. It requires jQuery.

javascript:$("a")[35][(r=(""+{})[5])+(""+!1)[2]+"i"+r+"k"]()

Commented version

$("a")[35] // Gets the 35th link (to google)
[
  (r=(''+{})[5]) // ''+{} is "[object Object]" get 5th char "c", assign it to variable r
  +(''+!1)[2] // grabs "l"
  +"i"+r+"k" // "ick" which makes "click" function
]() // Execute

As more links get published, you have to update the 35 to accomodate. (Again, it only runs on this page).

Tested on Chrome 35.0.1916.153

\$\endgroup\$
2
  • \$\begingroup\$ Do I get an exceptional bonus for not having .:/ in my answer? \$\endgroup\$
    – soktinpk
    Aug 25, 2014 at 1:54
  • \$\begingroup\$ Yeah! Well done on our first completely legitimate answer! \$\endgroup\$ Aug 26, 2014 at 19:10
2
\$\begingroup\$

No JavaScript

x.vu/zffW4Z

It took quite some searching to find an URL shortener that (a) was still around, and (b) avoided the prohibited characters.

\$\endgroup\$
2
  • \$\begingroup\$ Congratulations on your solution! However I'm afraid it breaks the rule about "Also, you may not use any other links, or redirect links". Might as well add yours to the leaderboard though =) \$\endgroup\$ Aug 24, 2014 at 21:12
  • \$\begingroup\$ Ok, undeleted my answer since it somehow made it to the leaderboard anyway. :) \$\endgroup\$ Aug 24, 2014 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.