Linking without a Link

-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!

Alexander Craggs

Posted 2014-08-24T20:52:52.280

Reputation: 469

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 a javascript: URL without using the characters scpt? – Peter Taylor – 2014-08-24T21:33:23.453

I 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.003

This 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

Answers

3

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

soktinpk

Posted 2014-08-24T20:52:52.280

Reputation: 4 080

Do I get an exceptional bonus for not having .:/ in my answer? – soktinpk – 2014-08-25T01:54:28.610

Yeah! Well done on our first completely legitimate answer! – Alexander Craggs – 2014-08-26T19:10:19.213

2

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.

Greg Hewgill

Posted 2014-08-24T20:52:52.280

Reputation: 2 641

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 =) – Alexander Craggs – 2014-08-24T21:12:59.700

Ok, undeleted my answer since it somehow made it to the leaderboard anyway. :) – Greg Hewgill – 2014-08-24T23:17:30.667