Clearing Out the Mess on Scribd

So recently I was checking out a few resumes for content and came across a promising one which happened to be uploaded on Scribd. Since I didn’t have an account, Scribd only showed me the preview pages which didn’t help a lot. I thought of googling around a bit and came across this blog post by someone who incidentally happened to be a friend of mine. I quickly went and downloaded the chrome extension,but it didn’t seem to work. So I decided to take matters into my own hands and started playing around with the DOM elements.

Now apart from the blurred content on Scribd, there were a few other things which cluttered the page – pesky ads and popups. So I decide to add a few bells and whistles to the entire thing. Apart from un-blurring the content, I thought of removing these popups and ads as well. Thanks to the awesome naming convention followed by people at Scribd, finding the elements to tweak was a piece of cake.

I realised that Scribd has two types of document(not an exhaustive list) – Scanned Upload and Documents which are uploaded with HTML.

In order to blur the scanned documents, Scribd serves them as an image and reduces the opacity of the of the image, so the easy fix is to change the opacity to 1.


As for the pdfs which are not scanned, the fix lies in changing the value of the text-shadow attribute.


So armed with the knowledge of basic jQuery, I decided to use the console and try removing the unnecessary parts and un blurring the document. Following is the step wise approach I followed :

  1. Removing the ads which come in between pages.iamge1
  2. All that is required is one line of code.image2
  3. And Voila, the message box is gone.image3.png
  4. Next up, removing the pesky popup. God they basically hide the majority of the content. It was quintessential to get rid of them.image4.png
  5. Magically, all it takes is one line of jQuery.image5.png
  6. There you go, no more popups.image6.png
  7. Now addressing the elephant in the room – un blurring the pdf. First up I will show how to un blur a non scanned pdf. image7.png
  8.  Just change the value of the text-shadow attribute to ‘black 0px 0px 0px ‘ and voila you are good to go.image8.png
  9. Now for removing the blur from the scanned pdf. Again just one line of code. Change the opacity attribute of class absimg to 1.0 by making use of jQuery’s selector function.image10
  10. Time to add some bells and whistles to it. I personally found the “Welcome message” at the top quite distracting, so I thought of removing that as well.image9.png

Now tying things up, I initially thought of write an extension for it, but it turns out there already exists one, you can find it here. Presently, there are a few bugs with it. I have sent a pull request fixing the errors, I hope it will be incorporated soon.

Incase you do wish to try out the latest extension code, you can clone the latest repo from here. And manually add the extension to your browser, in case you need help with that – you can consult this.

Note : There is a caveat attached with the extension. Scribd loads the pdf pages dynamically, ie as you scroll down it sends a request to the server and page is served to the client as and when needed, it actually loads 5-6 pages in advance to smoothen out the display while scrolling. So this method works for 5-6 pages and in order to un blur the pages, you are required to click the extension button again.

IITM VPN Connection for Mac Users

Recently I wanted to connect to one of the intranet sites of IIT Madras from my home. It required me to setup a VPN connection to IITM’s internal network. Googling around, led me to this page. Being skeptical of the promptness of reply by going through the channels of a Faculty Advisor, I decided to search a bit more and some youtube comment led me to the credentials required for the VPN connection.So setting up a connection was a child’s play once I got all the credentials. Go through the following steps to setup a VPN connection to IIT Madras’s internal network on a Mac :

  1. Go to System Preferences -> Network.
  2. Click on the “+” Button to add a new connection.image1
  3. A drop down menu would appear. Select VPN for Interface and select Cisco IPSec for VPN Type. You may enter anything you like for Service Name. Then hit Create.image2
  4. Enter for Server Address. You can anything for account name now. Note : While authenticating your VPN Connection, you will be required to give your LDAP username as account name.image6
  5. After filling in the two input boxes, click on Authentication Settings to add the Machine Authentication details i.e. Shared Secret Key and Group Name. Enter IITM_VPN for Group Name and I1tmC0nnect for Shared Secret Key. In the end, hit OK.image4
  6. We are almost there. Just click Connect and then hit Applyimage7
  7. You will be greeted by a VPN Connection pop asking you to authenticate yourself. Add your LDAP username as Account Name and LDAP password as Password. Then hit OK.image3
  8. And voila, sweet success. Now you are ready to go. Just fire up your favourite browser (or Firefox, incase of workflow 😛 ) and test it out.image5