Created
December 5, 2017 11:16
-
-
Save alexk0ch/85cf936ebe5efa5c4bdb9ccf0fa3df90 to your computer and use it in GitHub Desktop.
showTranslationKeys.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function()%7B%2F* eslint-disable *%2F%2F*https%3A%2F%2Fmrcoles.com%2Fbookmarklet%2Fhttps%3A%2F%2Fhelp.crossbrowsertesting.com%2Flive-testing%2Fgetting-started%2Finstalling-the-bookmarklet%2F*%2Fjavascript%3A(() %3D> %7Bconst vodFramesLocal %3D %5B%5D.slice.call(document.querySelectorAll('%5Bsrc*%3D"%2Flocal.vod.wix.com"%5D'))%3Bconst vodFrames %3D %5B%5D.slice.call(document.querySelectorAll('%5Bsrc*%3D"%2Fwix-vod"%5D'))%3Bconst allVodFrames %3D %5B...vodFrames%2C ...vodFramesLocal%5D%3Bconst getReplacedSource %3D src %3D> %7Bif (%2FshowTranslationKeys%2F.test(src)) %7Breturn src%3B%7Dconst parts %3D src.split('.html')%3Bif (parts%5B1%5D %26%26 parts%5B1%5D%5B0%5D %3D%3D%3D '%3F') %7Breturn %60%24%7Bparts%5B0%5D%7D.html%3FshowTranslationKeys%3Dtrue%26%24%7Bparts%5B1%5D.slice(1)%7D%60%7Dreturn %60%24%7Bparts%5B0%5D%7D.html%3FshowTranslationKeys%3Dtrue%60%3B%7D%3Bif (!allVodFrames.length) %7Bwindow.location.href %3D getReplacedSource(window.location.href)%3Bwindow.location.reload()%3Breturn%3B%7DallVodFrames.forEach(frame %3D> %7Bframe.setAttribute('src'%2C getReplacedSource(frame.getAttribute('src')))%3B%7D)%3B%7D)()%7D)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment