UVA Tab Problem Title

Put problem name in as title when viewing a problem on UVA

  1. // ==UserScript==
  2. // @name UVA Tab Problem Title
  3. // @namespace https://greasyfork.org/users/8233
  4. // @description Put problem name in as title when viewing a problem on UVA
  5. // @include https://uva.onlinejudge.org/*
  6. // @version 2
  7. // @grant none
  8. // ==/UserScript==
  9. var probname = document.getElementById('col3_content_wrapper').getElementsByTagName('h3') [0].innerText;
  10. if (probname !== undefined) {
  11. document.title = probname;
  12. }