Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mercurial-devel-native-test mercurial-devel-native-test
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • Testing Projects
  • mercurial-devel-native-testmercurial-devel-native-test
  • Issues
  • #2

Closed
Open
Created Nov 29, 2019 by Raphaël Gomès@raphael.gomesMaintainer

User script to add a confirm prompt to Phabricator when you have written text

Completely untested, probably does not work as-is, just stored here to not lose the idea.

It will not handle other pending actions than text written in a textarea (like checking "done" on conversations, etc.).

window.onbeforeunload(function(event) {                                         
    var textAreas = document.getElementsByTagName("textarea");                  
                                                                              
    if (textAreas.some(function(area) { area.value.length > 0})) {              
        return "You have unsaved changes. Are you sure you want to leave this page?"
    }                                                                           
});       
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking