Change to Special Mess

Changes hostel info for vit chennai website to special mess everytime

  1. // ==UserScript==
  2. // @name Change to Special Mess
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-07-17
  5. // @license GPLv3
  6. // @description Changes hostel info for vit chennai website to special mess everytime
  7. // @author You
  8. // @match https://vtopcc.vit.ac.in/vtop/content
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=ac.in
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16.  
  17. function handleInteraction(event) {
  18. let element = document.querySelector("#\\36 a > div > div > table > tbody > tr:nth-child(7) > td:nth-child(2)");
  19. element.innerHTML = "Special Mess - MOTHER HOSPITALITY";
  20. }
  21.  
  22. // Add event listeners for mouse, touch, and scroll events
  23. document.addEventListener('mousedown', handleInteraction);
  24. document.addEventListener('touchstart', handleInteraction);
  25. document.addEventListener('scroll', handleInteraction);
  26. })();