Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var scripts = document.querySelectorAll('head script:not([src])');
  2. var odooDebugInfo = false;
  3. scripts.forEach(function(script) {
  4. var scriptText = script.text;
  5. if (scriptText.trim().startsWith("var odoo =")) {
  6. // For odoo < v11
  7. console.log(window.location);
  8. // For odoo > v12
  9. if (scriptText.includes("debug:")) {
  10. eval(scriptText);
  11. odooDebugInfo = odoo;
  12. }
  13. }
  14. });
  15.  
  16. console.log(odooDebugInfo); // for v12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement