Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed for new LMS website #2

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ A simple browser extension that automatically logs you into the college's LMS we

## Installation
1. Download the files to a folder
2. Edit the 'logger.js' file with your ID and password
2. Edit the 'logger.js' and replace the id and pass with your ID and Passwords.
3. Go to 'Extensions' in your browser
4. Enable 'Developer Mode' on the top-right corner
5. Click on 'Load Unpacked' on the top-left corner
6. Select the folder in which you downloaded the files
7. Now, open the main LMS page or the login page

----24/11/2023---<br>
Updated for newer LMS website <br>
<br><br>
----02/01/2023---<br>
Updated for new UG-2023 LMS website
23 changes: 14 additions & 9 deletions logger.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
$(document).ready(function () {
var url = window.location.href
console.log(url);
let id="ID_HERE"
let pass="PASS_HERE"
if( url == 'https://lms.iiitkottayam.ac.in/'){
document.getElementById('username').value=id;
document.getElementById('password').value=pass;
document.getElementsByClassName("btn btn-primary")[0].click();
}
if(url=='https://lmsug23.iiitkottayam.ac.in/'){
document.getElementsByClassName("btn-login d-inline-block")[0].click();

if( url == 'https://lms.iiitkottayam.ac.in/')
document.getElementsByClassName('btn-login')[0].click();
}

if(url == 'https://lms.iiitkottayam.ac.in/login/index.php' || url == 'https://lms.iiitkottayam.ac.in/login/index.php/#') {
//replace your ID below
document.getElementById('username').value = "replace_ID";

//replace your password below
document.getElementById('password').value = "replace_password";
document.getElementsByClassName('btn btn-primary btn-block mt-3')[0].click();
if(url == 'https://lms.iiitkottayam.ac.in/login/index.php' || url == 'https://lms.iiitkottayam.ac.in/login/index.php/#'||url=='https://lmsug23.iiitkottayam.ac.in/login/index.php') {
document.getElementById('username').value = id;
document.getElementById('password').value = pass;
document.getElementById('loginbtn').click();
}
})
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "LMS Logger",
"version": "1.0",
"manifest_version": 2,
"manifest_version": 3,

"content_scripts": [{
"matches": ["https://lms.iiitkottayam.ac.in/", "https://lms.iiitkottayam.ac.in/login/index.php", "https://lms.iiitkottayam.ac.in/login/index.php/#"],
"matches": ["https://lms.iiitkottayam.ac.in/" , "https://lms.iiitkottayam.ac.in/login/index.php", "https://lms.iiitkottayam.ac.in/login/index.php/#" ,"https://lmsug23.iiitkottayam.ac.in/login/index.php","https://lmsug23.iiitkottayam.ac.in/"],
"js": ["jquery.js","logger.js"]
}]
}