- visit(staging)
- hover(testLink)
- waitForHovercard
- hoverout(testLink)
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
On file: resources/mobile.nearby/NearbyGateway.js | |
mw.msg must be used with string literals for consistency | |
Line 83 Column 10 | |
mw.msg(msg, mw.language.convertNumber(d)) | |
On file: resources/mobile.talk.overlays/TalkSectionAddOverlay.js | |
mw.msg must be used with string literals for consistency |
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
SELECT singletonsperday.popupEnabled, singletonsperday.yearmonthday, ROUND(100*singletons/totalevents,2) AS singletons_percentage FROM | |
(SELECT popupEnabled, yearmonthday, SUM(1) AS singletons FROM | |
(SELECT event_popupEnabled AS popupEnabled, LEFT(timestamp, 8) AS yearmonthday, | |
event_sessionToken, event_pageIdSource, event_pageTitleHover, | |
COUNT(*) AS copies | |
FROM log.Popups_15777589 | |
WHERE wiki ='huwiki' AND event_isAnon = 1 | |
AND LEFT(timestamp, 8) < '20160828' | |
AND event_action = 'opened in same tab' | |
GROUP BY popupEnabled, yearmonthday, |
See https://phabricator.wikimedia.org/T141922
- Wait is 10ms by default
- Relax is waiting 500ms
- visit(staging)
See it in action (disabled vs enabled)
Apply the userscript using greasemonkey or similar to urls like https://phabricator.wikimedia.org/notification/query/unread/
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
var $ = window.jQuery | |
var log = [] | |
window.mw.trackSubscribe('event', (schema, e) => { | |
log.push([e.action, JSON.stringify(e)]) | |
}) | |
var STEPS = { | |
find_link: () => { | |
window.testel = $('a').filter((i, v) => v.textContent === 'Test') |
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
{ files: | |
{ '/resources/mediawiki.template.hogan/hogan.js': { mw_requires: [ 'mw.template' ] }, | |
'/resources/mobile.abusefilter/AbuseFilterOverlay.js': | |
{ requires: [ 'mobile.startup/Button', 'mobile.overlays/Overlay' ], | |
async_requires: [], | |
mw_requires: [ 'mw.template', 'mw.mobileFrontend' ], | |
templates: [ { module: 'mobile.abusefilter', fileName: 'Overlay.hogan' } ], | |
defines: [ 'mobile.abusefilter/AbuseFilterOverlay' ] }, | |
'/resources/mobile.abusefilter/AbuseFilterPanel.js': | |
{ requires: [ 'mobile.view/View', 'mobile.abusefilter/AbuseFilterOverlay' ], |
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
// ==UserScript== | |
// @name phabricator | |
// @namespace joaquino | |
// @include https://phabricator.wikimedia.org/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
document.body.onload = () => { | |
const animate = document.createElement('style') |
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
const Canduit = require('canduit') | |
const init = (conf) => new Promise((res, rej) => | |
Canduit(conf, (err, api) => err ? rej(err) : res(api))) | |
const run = (api, route, params) => new Promise((res, rej) => | |
api.exec(route, params, (err, resp) => err ? rej(err) : res(resp))) | |
const conf = { | |
user: '<USERNAME>', |