Comments (3)
I don't care a lot about this, other than the fact that the Namespace object has a different problem which suggests we should get rid of it: Firefox (at least) seems to have a built-in object called Namespace (XML-related, methinks), which we might want to use at some point down the road (unlikely, but still...).
$ grep "\WNamespace" modules/*.* *.* -c modules/twinklebatchdelete.js:4 modules/twinklebatchprotect.js:1 modules/twinklebatchundelete.js:1 modules/twinkledelimages.js:2 modules/twinkledeprod.js:2 modules/twinkleimagetraverse.js:2 modules/twinkleunlink.js:2 modules/twinklexfd.js:6 morebits.js:2
from twinkle.
Actually, having thought about this, I really prefer just using the namespace IDs as constants in code, ideally accompanied with a comment. Unlike compiled languages like C++, where using defined constants has no cost, JavaScript has to look up constants every time. And the namespace numbers aren't going to change anyway, so there is no problem of having to change the values.
from twinkle.
Done in 7db266c
from twinkle.
Related Issues (20)
- welcome: add {{Welcomeen-it}} (Italian) and {{Welcomeen-hi}} (Hindi)
- tag: for files, add {{Nominated for deletion on Commons}} and {{Deleted on Commons}}
- warn: add {{Uw-talkinarticle1}} through {{Uw-talkinarticle3}}
- arv: aiv screen grays out some check boxes when reporting an IP
- warn: if ARV window is open after warning a user, when auto refreshing, it loads a nonsensical page
- config: pressing save should scroll screen to the top
- config: vector-2022 table of contents lacks styling
- speedy: add {{Db-x3}}
- warn: add {{Uw-multiple-accts}}
- tag: add {{User-generated}}, {{BLP one source}}, {{BLP no footnotes}} HOT 1
- remove "twinkle" and "friendly" from module names HOT 4
- rename "twinklefluff.js" to "twinklerollback.js"
- Fix issues in Vector 2022 dark mode HOT 2
- warn: add {{Uw-mislead1}} through {{Uw-mislead3}}
- When reverting, edits that don't change wikitext are included in the number of edits you revert in the edit summary
- rename twinkle-pagestyles.css HOT 3
- xfd: widen cfd/s "new name" text box
- block: preset and template options should be simplified & reduce duplication
- xfd and speedy: display "User is blocked" next to "notify page creator if possible" check box
- add {{more plot}} to tag
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twinkle.