Fudan Library Access Button

January 15, 2021

The content in this post is inspired by Duke library access button as in link. I wrote a bookmarklet to access Fudan library resources via Fudan WebVPN. Although the final functionality is nearly identical to that of Duke, the implementation is different.

We will not discuss the actual implementation in this post. Instead, we simply give the installation and usage instructions.

javascript: (function() {
    a = document.createElement('script');
    a.src = 'https://webvpn.fudan.edu.cn/wengine-vpn/js/aes-js.js';
    a.async = false;
    document.body.appendChild(a);
    e = document.createElement('script');
    e.src = 'https://webvpn.fudan.edu.cn/wengine-vpn/js/js/portal.js';
    e.async = false;
    e.onload = function() {
        wrdvpnIV = 'wrdvpnisthebest!';
        wrdvpnKey = 'wrdvpnisthebest!';
        location.href = 'https://webvpn.fudan.edu.cn' + encrypUrl(parseProtocol(location.href), location.href);
    };
    document.body.appendChild(e);
})();

After installation of the access button, you will have a button on your browser’s bookmark toolbar. You can gain access to web content that requires Fudan VPN service through one-click of the button (UIS login is still needed, at least for the first time).

Installation Instruction

Mozilla Firefox

Fudan Library Access Button

  1. Right click on the above link to add the button to your Bookmarks bar. From the dropdown, select Bookmark this Link and choose your folder.

Google Chrome, Edge or Safari

Fudan Library Access Button

  1. Drag the above link to your Bookmarks Toolbar.

Internet Explorer

Fudan Library Access Button

  1. Right click on the above link to add the button to your Bookmarks bar. From the dropdown, select Add to Favorites.

  2. Probably, there will be a safety warning. If you are not confident, you can read through the detail of the link below.

Mobile Users

javascript:(function(){a=document.createElement('script');a.src='https://webvpn.fudan.edu.cn/wengine-vpn/js/aes-js.js';a.async=false;document.body.appendChild(a);e=document.createElement('script');e.src='https://webvpn.fudan.edu.cn/wengine-vpn/js/js/portal.js';e.async=false;e.onload=function(){wrdvpnIV='wrdvpnisthebest!';wrdvpnKey='wrdvpnisthebest!';location.href='https://webvpn.fudan.edu.cn'+encrypUrl(parseProtocol(location.href),location.href);};document.body.appendChild(e);})();
  1. Copy the single line text above.
  2. Open the browser and create a new bookmark of any page. Then tap Edit and replace the name as Fudan Library Access Button(you can change the name as you like) and replace the bookmark link by the copied text.

Usage Instruction

Our usage instruction will be demonstrated through an example.

  1. Go to a Fudan library resource link, for example, link. If you are not connected to Fudan VPN or other library VPNs, you should not have access to the PDF file.

  2. After the webpage is fully loaded, click the button. You will be navigated to Fudan WebVPN homepage and asked to input your UIS credentials.

  3. Login your UIS account.

  4. You will be redirected back to the link you have opened. Try to open the PDF file.

If you encounter any issue, please leave a message below.

Known Issue

Recently, Fudan WebVPN cannot redirect to the link after login. Temporary alternative solution is to login WebVPN first and then use the button.

 

Yingzhou Li

 


Discussion

I'm a faculty at Fudan University. Follow me on Github and Bitbucket. Hopefully, you will find my code useful. You are also welcome to either email me or post comments below to discuss on these posts.